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
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
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
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
alexandre.sie...@gmail.com wrote:
Please let's not turn this into an ad hominem discussion by adding remarks on
what the other
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 = as.vector(v,
-project.org
Subject: Re: [R] as.vector with mode=list and POSIXct
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
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 and
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()
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
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(l)
List
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 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
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 a
problem that I wanted to share with you.
Works fine with, say, numeric:
v = c(1, 2, 3
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
13 matches
Mail list logo