That's a very interesting point, David. The part I actually didn't know is that
the class of an object is an attribute, and that by "removing all attributes"
the function would in effect unclass it.
Thank you.
--
Alexandre Sieira
CISA, CISSP, ISO 27001 Lead Auditor
"
ain for your interest and advice.
--
Alexandre Sieira
CISA, CISSP, ISO 27001 Lead Auditor
"The truth is rarely pure and never simple."
Oscar Wilde, The Importance of Being Earnest, 1895, Act I
On 22 de maio de 2013 at 15:59:46, Jeff Newmiller (jdnew...@dcn.davis.ca.us)
wrote:
M
now to treat POSIXct values differently.
All of a sudden, the POSIXct objects I inserted are being treated, for example,
by format as numeric instead of being dispatched to format.Date as expected.
So I don't think my reaction to this issue was illogical at all. Hope you'll
agree now t
POSIXct[1:1], format: "2013-05-21 09:54:11"
However, the next thing I need to do is a min() over that list, so I need to
convert the list into a vector again.
I agree completely with you that this is horrible for performance, but it is a
temporary workaround until values() is "fix
So it does. I had tried list() but not as.list(). Silly me. :)
Thank you very much, William.
--
Alexandre Sieira
CISA, CISSP, ISO 27001 Lead Auditor
"The truth is rarely pure and never simple."
Oscar Wilde, The Importance of Being Earnest, 1895, Act I
On 20 de maio de 2013 at 18:32:3
on(x) {
retval = list()
for (i in 1:length(x)) retval[[i]] = x[i]
return(retval)
}
Is there a better way to do this (other than using *apply instead of for above)
that better leverages vectorization? Am I missing something here?
Thanks!
--
Alexandre Sieira
CISA, CISSP, ISO 270
" argument is a vector of a non-primitive type. That would
have saved me a few hours of debugging in the last few days, so I imagine it
must be relevant for more people as well.
--
Alexandre Sieira
CISA, CISSP, ISO 27001 Lead Auditor
"The truth is rarely pure and never simple.&qu
> for (i in seq(from=d1, to=d2, by="day")) print(class(i))
[1] "numeric"
[1] "numeric"
This is output from R version 2.15.2 (2012-10-26) on Mac OS X 10.8.2.
Is this expected behavior?
--
Alexandre Sieira
CISA, CISSP, ISO 27001 Lead Auditor
"Th
8 matches
Mail list logo