Displaying 6 results from an estimated 6 matches similar to: "Help on creating a sequence of vectors"
2010 Feb 09
3
subset in a matrix
Hi,
I have a matrix of data values like the example bellow. I would like to
extract a subset of the matrix for the values where the first column is
negative. I am using the subset function. However, I am getting an error
message that the conditional variable doe snot exist. For some reason, the
subset operation only works if I transform the matrix to a data set using
as.data.set(). The help
2011 Dec 27
1
differences between 1.7 and 1.7.1 glmnet versions
Dear All,
?
I have found differences between glmnet versions 1.7 and 1.7.1 which, in
my opinion, are not cosmetic and do not appear in the ChangeLog. If I am
not mistaken, glmnet appears to return different number of selected
input variables, i.e. nonzeroCoef(fit$beta[[1]]) differes between
versions. The code below is the same for 1.7.1 and 1.7, but you can see
that outputs differ. I would
2007 May 28
1
where did the factor name go
> tmp <- data.frame(y=rnorm(12), a=factor(rep(letters[1:4],3)))
> tmp
y a
1 -0.60866099 a
2 0.55500538 b
3 0.12231693 c
4 -0.24613790 d
5 -0.09253593 a
6 -1.54652581 b
7 0.17204210 c
8 -1.22778942 d
9 1.22151194 a
10 -0.43982577 b
11 -1.25444287 c
12 -0.97251060 d
> tmp.aov <- aov(y ~ a, data=tmp)
> summary(tmp.aov)
Df Sum Sq Mean Sq F value
2006 Jul 10
2
How to get R to ignore certain values when analyzing a column in a data table ?
Apologies if this is in (one of the many) manuals somewhere... Trying
to switch to R from other stats programs.
Basically, I have a large data table I've dumped from a DB, some of
the values which are nulls '-' which I've converted to zeros. I've
read it in using read.table fine.
I want R to ignore the zero values when graphing or doing various
other calculations.
Is
2006 Apr 06
1
rbind
Hi list,
I have been trying to pileup dataframes with different column names using
rbind. I am getting the following error message. I was wondering if there is
a way to go around this minor problem?
Error in match.names(clabs, names(xi)) : names don't match previous names:
G
Thanks indeed for your information
Regards
Mahdi
--
-----------------------------------
Mahdi Osman (PhD)
2011 Feb 02
0
How column names/row names are preserved in matrix calculation?
Can somebody tell me that, if I do some arithmetic calculation over 2
matrices then how the column names and row names are preserved? It seems
that, for multiplication, column names and row names of the 2nd matrix are
preserved and for additional, there seems not having any explicit rule:
> set.seed(1)
> dat1 <- matrix(rnorm(25), 5); colnames(dat1) = rownames(dat1) =