search for: transitd

Displaying 6 results from an estimated 6 matches for "transitd".

Did you mean: transit
2017 Jun 19
3
How to Transform a Factor Variable into a Date
Dear all, Hope you are doing great. I have a .csv file that I read into R, the .csv file consistss of two fields (TransitDate and CargoTons). The TransitDate I formatted from Excel in the fashion mmm-yy (e.g.: Apr-2013). However R does not recognize the field TransitDate as a date field. Here is the code: library(lubridate) Dataset <- read.table("U:/NEWCargoData.csv", header=TRUE, sep=",", na...
2017 Nov 01
3
Adding Records to a Table in R
Dear R friends, I am currently working with time series data, and I have a table(as data frame) that has looks like this (TransitDate are in format = "%e-%B-%Y") : TransitDate Transits CargoTons 1985-04-01 100 2500 1985-05-01 135 4500 1985-06-01 120 1750 1985-07-01 100 3750 1985-08-01 200 1250 The problem is, that t...
2017 Nov 01
0
Adding Records to a Table in R
Hi Paul, #First I set up some sample data since I don't have a copy of your data dtOrig <- as.Date( c("1985-04-01","1985-07-01","1985-12-01","1986-04-01")) dfOrig <- data.frame( TransitDate=dtOrig, Transits=c(100,100,500,325), CargoTons=c(1000,1080,3785,4200) ) #Generate the complete set of dates as a data frame dfDates<- data.frame( TransitDate=seq(from=as.Date("1985-04-01"),by="1 month",length=13) ) # do the merge adding the "missing" rows (wher...
2017 Nov 08
3
Adding Records to a Table in R
Dear Eric, Hope you are doing great. I also tried the following: #First I created the complete date sequence TransitDateFrame <- data.frame(TransitDate=seq(as.Date(dataset1[1,1]), as.Date(dataset1[nrow(dataset1),1]), by = "month")) #Then I did the merging dataset1NEW <- merge(TransitDateFrame, dataset1, by="TransitDate", all.x=TRUE) Now it has, as expected the total number of rows. Th...
2017 Jun 19
0
How to Transform a Factor Variable into a Date
...7") as.yearmon(my.factor) ## gets around the factor-vs-character issue On Mon, Jun 19, 2017 at 3:07 PM, Paul Bernal <paulbernal07 at gmail.com> wrote: > Dear all, > > Hope you are doing great. I have a .csv file that I read into R, the .csv > file consistss of two fields (TransitDate and CargoTons). > > The TransitDate I formatted from Excel in the fashion mmm-yy (e.g.: > Apr-2013). However R does not recognize the field TransitDate as a date > field. > > Here is the code: > > library(lubridate) > > Dataset <- read.table("U:/NEWCargoData...
2017 Nov 08
0
Adding Records to a Table in R
Hi Instead of attachments copy directly result of dput(TransitDateFrame) and dput(dataset1) to your email. Or, if your data have more than about 20 rows you could copy only part of it. dput(TransitDateFrame[,1:20]) dput(dataset1[,1:20]) Only with this approach we can evaluate your data in all aspects and provide correct answer. Cheers Petr > -----Origina...