Displaying 4 results from an estimated 4 matches for "numchecked".
2009 Jun 04
1
how to tell if as.numeric succeeds?
Suppose I have a vector of strings. I'd like to convert this to a vector of
numbers if possible. How can I tell if it is possible?
as.numeric() will issue a warning if it fails. Do I need to trap this
warning? If so, how?
In other words, my end goal is a function that takes a vector of strings and
returns either a numeric vector or the original vector. Assuming this
doesn't already
2002 Mar 29
0
FW: Newbie struggling with "factors"
...t;,"factor")
return(X)
}
contains <- function(X, name)
{
if(is.character(name) )
name <- pmatch( name, attr(X,"boxnames" ) )
retval <- sapply( strsplit(X, ",") , function(X) ( name %in% X ) )
return(retval)
}
numchecked <- function(X)
{
retval <- sapply( strsplit(X, ","), length )
return(retval)
}
summary.checklist <- function(x, ...)
{
sum <- apply( as.matrix(x), 2, sum )
mean <- apply( as.matrix(x), 2, mean )
return( rbind(sum,mean))
}
as.matrix.checklist &l...
2002 Mar 29
3
Newbie struggling with "factors"
I am processing some survey results, and my data are
being read in as "factors". I don't know how to
process these things in any way.
To start with, several of the survey questions are
mulit-choice check boxes on the original (web-based)
survey, as in "check all that apply".
These are encoded as numbers. For example, if the
survey has a question:
Which operating systems
2006 Apr 12
1
powerd not behaving with an Asus A8V-MX and Athlon 64 X2 3800+
I have an Asus A8V-MX motherboard with an AMD Athlong 64 X2 3800+ CPU
and I'm trying to run powerd to keep it cooler/quieter/greener.
I'm running -STABLE (6.1-RC) cvsup'ed a couple of days ago, with a
kernel config that consists of the SMP sample plus an atapicam
device.
I'm loading the cpufreq.ko module in /boot/loader.conf.
I've attached my dmesg output and sysctl -a