Re: [R] Help understanding loop behaviour

2021-04-29 Thread PIKAL Petr
Hi Your code is hardly readable as you used HTML formating (not recommended) so I used another (split) approach. Third column seems to be simple #make list lll <- split(as.factor(COMPANY_NUMBER), COMPANY_NUMBER) #calculate sequences as.numeric(unlist(lapply(lll, function(x) 1:length(x shou

Re: [R] Date Time, as.POSIXct used locale, strange plot behavior

2021-04-29 Thread Jeff Newmiller
What is your TZ environment variable set to? That's what time conversion defaults to ?DateTimeClasses Also, I am not sure CEST is a valid timezone designation... it can be system dependent, but using one of the elements listed in ?OlsonNames. On April 29, 2021 12:22:44 PM PDT, Tilmann Faul w

[R] Date Time, as.POSIXct used locale, strange plot behavior

2021-04-29 Thread Tilmann Faul
Hy, stumbled over the following problem while plotting DateTime Objects. plot(as.POSIXct(c("2021-04-21 00:00:00", "2021-04-21 23:59:59")), c(0, 1), type='l') arrows(as.POSIXct("2021-04-21 00:00:00", tz="CEST"), 0.3, as.POSIXct("2021-04-21 00:00:00", tz="CEST"), 0.2, l

[R] Help understanding loop behaviour

2021-04-29 Thread e-mail ma015k3113 via R-help
I am trying to understand how loops in operate. I have a simple dataframe xx which is as follows COMPANY_NUMBER NUMBER_OF_YEARS #0070837 3 #0070837 3 #0070837 3 1000403 4 1000403