Re: [R] merged data frame with

2020-09-29 Thread Carlos Ortega
Hi All, I recreated a new "sintetic" df1 based on df2 and I could merge: > day_1 <- as.POSIXct("2005-11-14-00-00", format="%Y-%m-%d-%H-%M", tz="Etc/GMT-1") > day_2 <- as.POSIXct("2005-11-14-12-00", format="%Y-%m-%d-%H-%M", tz="Etc/GMT-1") > df2 <- data.frame(data_POSIX=seq(day_1, day_2, by="30 mi

Re: [R] merged data frame with

2020-09-29 Thread Ivan Calandra
Hi Stefano, For the merge() part, I'll leave it to more expert users (I rarely use merge(), and every time I need it, it's painful...). To know why instead of NA, check the results with str(df3); I guess it is not the mode you expected. For more details, you should provide the file, or bet

[R] merged data frame with

2020-09-29 Thread Stefano Sofia
Dear R users, I'm struggling with a simple "merge". I have an external file called df.txt like data_POSIX, event 2005-11-14 02:30:00, "start" 2005-11-14 11:30:00, "end" I load it with df1 <- read.table(file="df.txt", header=TRUE, sep=",", dec = ".", stringsAsFactors=FALSE) df1$data_POSIX <- as