Hello!
 
I have a problem making a new variabel in a dataframe that consists of a time 
difference.
 

It seems that the new variable gets into the dataframe but I cant look at it 
anymoore.
 
Here is what hapens.
 
> tdiff<- difftime(Kontrolltid, Starttid, units="auto")> tdiffTime differences 
> in mins [1] 168  NA  NA 165 175 140 191 195 130 160 135 165 330 178 141  NA 
> 119  90  70[20]  99 115  70  65  90  90  65  90  75  85  93  52  75  60  90 
> 105  70  65  60[39]  85 110  65  60  98  62  71  61  41  80  67  83  72  
> 73attr(,"tzone")[1] ""
 
> givnona<- data.frame(givnona, tdiff)
 
names(givnona) [1] "Vanna"       "Datum"       "Starttid"    "Kontrolltid" 
"Zo.Höger"    [6] "Zo.Vänster"  "Mm.Höger"    "Mm.Vänster"  "tot.zo"      
"tot.mm"     [11] "tdiff"   
 fix(givnona)Error in edit.data.frame(get(subx, envir = parent), title = subx, 
...) :   can only handle vector and factor elements
 
 
 
tdiff <-structure(c(168, NA, NA, 165, 175, 140, 191, 195, 130, 160, 135, 165, 
330, 178, 141, NA, 119, 90, 70, 99, 115, 70, 65, 90, 90, 65, 90, 75, 85, 93, 
52, 75, 60, 90, 105, 70, 65, 60, 85, 110, 65, 60, 98, 62, 71, 61, 41, 80, 67, 
83, 72, 73), tzone = "", units = "mins", class = "difftime")> 
 
Any solution?
cheers
/Jojje
 
_________________________________________________________________


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to