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
"The truth is rarely pure a
lap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of David Winsemius
> Sent: Wednesday, May 22, 2013 1:52 PM
> To: Alexandre Sieira
> Cc: r-help@r-project.org
> Subject: Re: [R] as.vector with mo
On May 20, 2013, at 2:09 PM, Alexandre Sieira wrote:
> I was trying to convert a vector of POSIXct into a list of POSIXct, However,
> I had a problem that I wanted to share with you.
>
> Works fine with, say, numeric:
>
>
>> v = c(1, 2, 3)
>> v
> [1] 1 2 3
>> str(v)
> num [1:3] 1 2 3
>> l =
Gents:
You've both been polite and thoughtful, but I think you should take
your discussion private, no?
-- Bert
On Wed, May 22, 2013 at 12:57 PM, Alexandre Sieira
wrote:
> Please let's not turn this into an ad hominem discussion by adding remarks on
> what the other thinks or knows, as this wi
Please let's not turn this into an ad hominem discussion by adding remarks on
what the other thinks or knows, as this will get us nowhere fast. Let's focus
on the issue, ok? :)
Again, the point behind my workaround was to try to change the rest of my
program as little as possible while I waited
My perception of illogic was in your addition of more data structure complexity
when faced with this difficulty. R has best performance when calculations are
pushed into simple typed vectors where precompiled code can handle the majority
of the work. These are simpler structures, not more comple
Hi, Jeff.
Thanks for your thoughtful suggestions.
I do not plan to wait for the hash package to be redesigned to meet my
expectations. As a matter of fact, I have:
a) Submitted a report of unexpected behavior in hash::values, which the package
maintainer quickly replied to and said would exami
I recommend that you not plan on waiting for the hash package to be redesigned
to meet your expectations. Also, your response to discovering this feature of
the hash package seems illogical.
>From a computer science perspective, the hash mechanism is an implementation
>trick that is intended to
You are absolutely right.
I am storing POSIXct objects into a hash (from the hash package). However, if I
try to get them out as a vector using the values() function, they are
unclassed. And that breaks my (highly vectorized) code. Take a look at this:
> h = hash()
> h[["a"]] = Sys.time()
> st
I don't know what you plan to do with this list, but lists are quite a bit less
efficient than fixed-mode vectors, so you are likely losing a lot of
computational speed by using this list. I don't hesitate to use simple data
frames (lists of vectors), but processing lists is on par with for loop
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of Alexandre Sieira
> Sent: Monday, May 20, 2013 2:10 PM
> To: r-help@r-project.org
> Subject: [R] as.vector with mode="list" and POSIXct
>
> I was trying to conver
elp-boun...@r-project.org] On
> Behalf
> Of Alexandre Sieira
> Sent: Monday, May 20, 2013 2:10 PM
> To: r-help@r-project.org
> Subject: [R] as.vector with mode="list" and POSIXct
>
> I was trying to convert a vector of POSIXct into a list of POSIXct, However,
> I had
I was trying to convert a vector of POSIXct into a list of POSIXct, However, I
had a problem that I wanted to share with you.
Works fine with, say, numeric:
> v = c(1, 2, 3)
> v
[1] 1 2 3
> str(v)
num [1:3] 1 2 3
> l = as.vector(v, mode="list")
> l
[[1]]
[1] 1
[[2]]
[1] 2
[[3]]
[1] 3
> str(
13 matches
Mail list logo