Suppose I have a list of logicals, such as returned by lapply:
Theoph$Dose[1] - NA
Theoph$Time[2] - NA
Theoph$conc[3] - NA
lapply(Theoph,is.na)
Is there a direct way to execute logical or across all vectors? The
following gives the desired result, but seems unnecessarily complex.
/337015
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
- Original Message - From: Tim Bergsma [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Friday, June 08, 2007 2:57 PM
Subject: [R] logical 'or' on list of vectors
Suppose
Is there a conventional way to test for nested factors? I.e., if 'a'
and 'b' are lists of same-length factors, does each level specified by
'a' correspond to exactly one level specified by 'b'?
The function below seems to suffice, but I'd be happy to know of a more
succinct solution, if it
, and never use Sys.time(),
the vulnerabilities do not pertain.
To the point: if I'm merely converting to and from character data that
does not represent time zones, is there still a time zone vulnerability
with strftime() and strptime()?
Thanks in advance,
Tim Bergsma, PhD
Metrum Research Group, LLC
.
On 4/5/07, Tim Bergsma [EMAIL PROTECTED] wrote:
Hi.
I frequently convert date and time data to and from character
representations. I'm frustrated with chron, because 'seconds' are
required to create a time object (my input data never has seconds).
You could use paste:
times(paste
- chron(1:5, out.format = out.fmt)
x
On 4/5/07, Tim Bergsma [EMAIL PROTECTED] wrote:
Gabor,
thanks for the feedback. I like the idea of coercing the system time
zone, and sticking with strptime/strftime. The balance would probably
tip in favor of chron, however, if I could get the format
Hi.
I have a vector of quantiles and a vector of probabilites that, when
plotted, look very like the gamma cumulative distribution function. I
can guess some shape and scale parameters that give a similar result,
but I'd rather let the parameters be estimated. Is there a direct way
to do
I tried recently to extend data.frame using S4, with depressing results.
Someone asked about this back in January, and was referred to the
Register or Convert advice. Putting the pieces together, I'm guessing
that to extend data.frame usefully in S4, one would actually have to
write it
Hi.
When I extend numeric with S4 and create an instance, I get something
that looks and acts like a numeric. When I extend data.frame and
create an instance, I get a NULL 'core'. Why is this, and can it be
fixed? setOldClass(), prototype=, and initialize() don't seem to help.
Thanks,
Tim