I have a data.frame, data, with 30 factor variables. I would like to tabulate
the frequencies of each variable and output to a tex file using Sweave. Here is
my code chunk:
<>=
library(xtable)
for(j in 1:30){
cap <- paste("Frequency counts for Q",j,".", sep="")
xtable(t(table(data[,j])),capt
Dear R-users,
I have some very simple data where 1's represent events and zeroes non-events,
e.g.
temp <- rbind(c(0,1,0,0,1,1,1,0), c(0,0,0,1,0,0,0,0))
For each row in the matrix, I would like to replace a singelton event by a 0.
That is, any 1 surrounded by zeroes (010) should be replaced by a
I have a huge dataset for which I only want to read in a subset of it. Is it
possible to use read.table to read in only a subset of the data? For example,
something like read.table('~/data.txt', subset = chromosome=='1' )
If not, then why not? This seems to be a feature available in all other
s
Hi,
I have an object from the prediction function from the ROCR package and I would
like to extract one of the slots from the object, for example the cutoffs slot.
However the usual techniques ($, [["name"]]) of subsetting don't work. How can
I assess the lists in the slots?
Here is an example
Hi fellow R-users,
I am interested in fitting the following model
yi=log(a+xi*b*e), e~N(0,sigma2)
and where x is a known covariate and a and b are parameters to be estimated as
is sigma2.
I am not sure how to fit such a model using lm or nls. Is there another
function I can use to fit this?
5 matches
Mail list logo