search for: data_factor

Displaying 4 results from an estimated 4 matches for "data_factor".

2016 Apr 11
2
Query about use of format in strptime
...th day hh mm hs 2007 11 19 0 0 0.00 2007 11 19 0 30 0.00 2007 11 19 1 0 0.00 2007 11 19 1 30 0.00 2007 11 19 2 0 0.00 2007 11 19 2 30 0.00 2007 11 19 3 0 0.00 2007 11 19 3 30 0.00 2007 11 19 4 0 0.00 2007 11 19 4 30 0.00 ... whth semi-hourly data. I need to deal with date so I used strptime: Snow$data_factor <- as.factor(paste(Snow$year, Snow$month, Snow$day, Snow$hh, Snow$mm, sep="-")) Snow$data_strptime <- strptime(Snow$data_factor, format = "%Y-%m-%d-%H-%M") It gives me year month day hh mm hs data_factor data_strptime 1 2007 11 19 0 0 0 2007-11-19-0-0 2007-...
2016 Apr 11
0
Query about use of format in strptime
Hi Stefano, As the help page says: "The default for the format methods is "%Y-%m-%d %H:%M:%S" if any element has a time component which is not midnight, and "%Y-%m-%d" otherwise. This is because when the result is printed, it uses the default format. If you want a specified output representation: format(strptime(init_day, format="%Y-%m-%d-%H-%M"),"%Y-%M-%d
2016 Apr 11
3
Query about use of format in strptime
Dear R-list users, I need to use strptime because I have to deal with date with hours and minutes. I read the manual for strptime and I also looked at many examples, but when I try to apply it to my code, I always encounter some problems. I try to change the default format, with no success. Why? How can I change the format? 1. init_day <- as.factor("2015-02-24-00-30")
2018 Mar 16
0
How to save the values of the factors of a CFA analysis in my dataset?
...ion =~ JOBMOTIVATIE_intrin1 + JOBMOTIVATIE_intrin2 + JOBMOTIVATIE_intrin3' fit <- cfa(HS.model, data = dataset, scores="regression") summary(fit, fit.measures=TRUE, standardized=TRUE) I managed to get the values for the five factors in a seperate dataset using data_factor <- predict(fit) But I need these 5 factors (as columns, as variables), added to my original dataset. How can I achieve this? I tried cbind, but got an error: factorERS <- select(dataset, JOBMOTIVATIE_extsoc1 + JOBMOTIVATIE_extsoc2 + JOBMOTIVATIE_extsoc3) data_CFA <-...