Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert integer columns to double

I imported 2 csv files containing experiment data, one being the control group and one the test group. Heads shown here

enter image description here

The problem is that in 'Gaze_T' the columns 5+ are of type double, while in 'Gaze_C' they're of type integer.

So when doing a summary on the distance in both dataframes I get different outputs

enter image description here

How can I convert the integer columns in Gaze_C to double?

like image 538
deemel Avatar asked Mar 13 '14 13:03

deemel


1 Answers

use as.DATATYPE(column)

as.double(Gaze_T$Distance) 

This converts the column Distance in Gaze_T to double.

like image 55
Austin p.b Avatar answered Sep 28 '22 18:09

Austin p.b