Skip to content
Prev 313816 / 398503 Next

split character line into rows

To combine the date/time fields into one and
rename the variables, use this:
V1       V2     V3    V4 V5
1 2010.12.26 00:00:52 688.88 11.69 43
2 2010.12.26 00:01:52 696.19 11.69 43
dta$V2), "%Y.%m.%d %H:%M:%S"), V2=dta$V3, 
  V3=dta$V4, V4=dta$V5)
date     V2    V3 V4
1 2010-12-26 00:00:52 688.88 11.69 43
2 2010-12-26 00:01:52 696.19 11.69 43
'data.frame':   2 obs. of  4 variables:
 $ date: POSIXct, format: "2010-12-26 00:00:52" 
     "2010-12-26 00:01:52"
 $ V2  : num  689 696
 $ V3  : num  11.7 11.7
 $ V4  : num  43 43

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352