Displaying 7 results from an estimated 7 matches for "row6".
Did you mean:
row
2009 Mar 05
3
Dropping rows conditionally
...ng).
I have been wanting to drop all the rows if there values are `NA' or have specific values like 1 or 2 or 3.
mdat <- matrix(1:21, nrow = 7, ncol=3, byrow=TRUE,
dimnames = list(c("row1", "row2","row3","row4","row5","row6","row7"),
c("C.1", "C.2", "C.3")))
mdat<-data.frame(mdat)
mdat
C.1 C.2 C.3
row1 1 2 3
row2 4 5 6
row3 7 8 9
row4 10 11 12
row5 13 14 15
row6 16 17 18
row7 19 20 21
I want to say drop...
2003 Dec 04
6
get mean of several rows
...gave up:
I have a 2-dimensional array, and I know how to split it into its rows
and how to get the mean for every row using 'sapply'.
But what I want is to calculate the mean over the first n rows, and then
the second n rows, etc., so that I get a vector like:
v == mean1(row 1:5), mean2(row6:10),...
(trivial, you might say. I find it rather mind-boggling, though: I tried
to get the mean from the array before splitting it, after splitting it,
looping through it with for-loops...I feel like an idiot by now; looks
like I missed a crucial point of how 'R' works.)
Thanks a lot...
2006 Mar 28
1
weights in glm (PR#8720)
...t:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.64459 NA NA NA
Row2 -0.05467 NA NA NA
Row3 0.24541 NA NA NA
Row4 0.42035 NA NA NA
Row5 0.43961 NA NA NA
Row6 0.04532 NA NA NA
Row7 -0.04881 NA NA NA
Row8 0.25370 NA NA NA
Row9 -0.14976 NA NA NA
Row10 -0.01267 NA NA NA
Col2 0.69283 NA NA NA
Col3...
2007 Nov 12
1
update matrix with subset of it where only row names match
I guess this has a simple solution:
I have matrix 'mat1' which has row and column names, e.g.:
A B C
row1 0 0 0
row2 0 0 0
....
rown 0 0 0
I have a another matrix 'mat2', essentially a subset of 'mat1' where the
rownames are all in 'mat1' e.g.:
B
row3 5
row8 6
row54 7
I want to insert the values of matrix mat2 for column B (in reality it
could be some or
2009 Oct 15
4
Generating a stochastic matrix with a specified second dominant eigenvalue
Hi,
Given a positive integer N, and a real number \lambda such that 0 < \lambda
< 1, I would like to generate an N by N stochastic matrix (a matrix with
all the rows summing to 1), such that it has the second largest eigenvalue
equal to \lambda (Note: the dominant eigenvalue of a stochastic matrix is
1).
I don't care what the other eigenvalues are. The second eigenvalue is
2007 Dec 07
0
Bug#454678: r-base-core: Crash when calling edit.matrix with edit.row.names = TRUE when there are no rownames (PR#10500)
...row = 10, ncol = 3); edit(mat, edit.row.names = TRUE)
col1 col2 col3
row1 0.6185206 0.32911907 -0.12263839
row2 0.4553981 -1.77532265 2.06745757
row3 0.4676557 0.58817426 -0.30507048
row4 1.1898153 -1.24888167 1.02240513
row5 -1.4809138 0.05212133 0.25272844
row6 1.5709981 -1.87496256 -0.05699266
row7 0.3770318 -0.43538598 -1.28299648
row8 1.3900096 0.15139637 -1.01168270
row9 -0.3973376 0.05933193 0.34420058
row10 -1.4248380 0.86637712 -1.25193470
> q()
when the matrix is simply saved from the editor -- ie no segfault.
Hope this helps, and...
2007 Dec 07
0
(PR#10500) Bug#454678: r-base-core: Crash when calling
...t.row.names = TRUE)
> col1 col2 col3
> row1 0.6185206 0.32911907 -0.12263839
> row2 0.4553981 -1.77532265 2.06745757
> row3 0.4676557 0.58817426 -0.30507048
> row4 1.1898153 -1.24888167 1.02240513
> row5 -1.4809138 0.05212133 0.25272844
> row6 1.5709981 -1.87496256 -0.05699266
> row7 0.3770318 -0.43538598 -1.28299648
> row8 1.3900096 0.15139637 -1.01168270
> row9 -0.3973376 0.05933193 0.34420058
> row10 -1.4248380 0.86637712 -1.25193470
>> q()
>
> when the matrix is simply saved from the editor -- ie no...