Gabriel,
Thanks. I'm just frustrated by the inconsistencies in what I see in
POSIXlt. I'm not even sure what the tzone attribute does. Here's an example
that show behavior different from POSIXct.
> tl <- as.POSIXlt("2001-04-05 12:00", tz="America/Chicago")
> tl
[1] "2001-04-05 12:00:00 CDT"
> at
The documentation for the POSIXlt class states '"POSIXlt" objects will
often have an attribute "tzone", a character vector of length 3 giving the
time zone name from the TZ environment variable and the names of the base
time zone and the alternate (daylight-saving) time zone. Sometimes this may
jus
There is something I'm really missing here. The function show is a
standardGeneric function, so the correct way to write it as method like
this:
setMethod("show", "Person", function(object) {
for an object of class "Person" for example.
Dave
On Tue, Jun 30, 2015 at 10:11 AM, wrote:
> Same thi
All,
So that suggests that .GlobalEnv[["X"]] is more efficient than get("X",
pos=1L). What about .GlobalEnv[["X"]] <- value, compared to assign("X",
value)?
Dave
On Wed, Dec 3, 2014 at 3:30 PM, Peter Haverty
wrote:
> Thanks Winston! I'm amazed that "[[" beats calling the .Internal
> directly
Fascinating! I tried the comparisons with all.equal(), expecting a
description of the difference, but TRUE was returned in both cases.
Dave
On Wed, Oct 29, 2014 at 3:26 PM, Winston Chang
wrote:
> I ran into this and found the result very surprising:
>
> identical( quote({ a }), quote({ a }) )
Joris,
Basically, the I() function, as it is used in a regression model, allows
the user to perform arithmetic operations on a variable that would
otherwise be interpreted by the formula. It is not trapped as a special
function as Error() is in aov().
There may be other applications where the c
Dominic,
Actually it makes perfect sense. When R prints vectors of length less
than 9, it does not ever need to print 2 digits for the index. For lengths
between 10 and 99, it may need to print an index with 2 digits, therefore,
it prints the first index and all single digit indexes with a leadin
Berry,
It sounds like you just need a little helper function like this:
ser <- function(x, len=100, f=0.1) {
dr <- extendrange(x, f=f)
return(seq(dr[1L], dr[2L], length.out=len))
}
I called it ser, short for sequence extended range. Use it thusly:
Ijustneed <- ser(D_orig)
Hope this h
Larissa,
So is the problem "in the matrix reference is mat[col][row] whereas in R
it is mar[row, col]?"
The solution is just recognizing the difference in references.
Dave
On Fri, Dec 6, 2013 at 7:21 AM, Larissa Hauer
wrote:
>
> Hi everybody,
>
> I'm trying to pass a matrix from R to C, wher
Skye,
I ran into a similar problem with RStudio. My solution was just to check
if "windows" exists and if it does, open windows, then check "quartz" and
so forth. You can restrict the exists function to look only in grDevices.
Dave
On Fri, Oct 25, 2013 at 4:19 AM, Milan Bouchet-Valat wrote:
>
Suharto,
I think that the key is to read the definition of exclude in the
Arguments section:
a vector of values to be excluded when forming the set of levels. This
should be of the same type as x, and will be coerced if necessary.
Because the levels already exist for x as a factor, they are n
11 matches
Mail list logo