Not sure I can translate the format of your Date column correctly, however the
command
DF1$Date <- as.Date(DF1$Date, format=’formatstr’)
Will convert the dates into a format correctly handled by R.
?strptime
Should give you an idea of what formatstr should look like.
I.e. if
date = 160721
as.
Oops, missed that one!
--
Ivan Calandra, PhD
Scientific Mediator
University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calan...@univ-reims.fr
--
https://www.researchgate.net/profile/Ivan_Calandra
https://publons.com/a
Hello,
Another thing to consider is to use Variable1 = NA, not '=='.
With '==' it will probably return TRUE/FALSE/NA.
Hope this helps,
Rui Barradas
Citando Ivan Calandra :
> This might not be the whole story, but part of the problem is that
> you want to select a _*character string*_ great
This might not be the whole story, but part of the problem is that you
want to select a _*character string*_ greater/smaller than another. That
doesn't make much sense!
I am not sure how to best compare two dates, but if you convert the Date
values into numeric, then that would work. The probl
Hello Everyone,
I am trying to replace the values in the 2nd column (Variable 1)
corresponding to certain dates (Date)
with NAs as shown below. Both Date and Variable1 are numeric vectors . I am
trying to use the transform function
as shown below but it doesn’t seem to work even though if I
5 matches
Mail list logo