Почему повторение объекта Date
или POSIXct
приводит к numeric
? Например:
test = as.Date("2009-01-01")
print( class( test ) )
# [1] "Date"
for ( day in test )
{
print( class( day ) )
}
# [1] "numeric"
То же самое происходит с POSIXct
:
test = as.POSIXct("2009-01-01")
print( class( test ) )
# [1] "POSIXct" "POSIXt"
for ( day in test )
{
print( class( day ) )
}
# [1] "numeric"
for(d in as.list(test)) print(class(test))
- person G. Grothendieck   schedule 12.08.2015for
делать то, что практически все хотят, чтобы он делал с (вектором? списком? чем угодно) дат. - person user3673   schedule 12.07.2017