Displaying 6 results from an estimated 6 matches for "matrixname".
2004 May 08
3
Indexing column of a matrix with infix $
I'm using 1.9.0 on Windoze 2k and I created a numeric matrix and used
colnames() to give it some column names, but if I try to select a
column using matrixname$validname I get a null return but if I use
matrixname[,4] it works fine. Looking at the help I think this is
because a matrix is not a recursive structure and I think it's saying
I shouldn't be surprised nor attempt this.
I'm in the process of transferring all my stats work to R havin...
2003 Aug 20
1
question for loop on matrix row level.
For the 1000 simulations, a matrix will be generated
each time. And, I need to choose the first row of the
generated matrix. The following loop doesn't work
though:
for (i in 1:1000) {
aval[i]<- matrixname[1,]
}
Any solution? thanks!
2010 Jun 02
3
writing a matrix in a file
Hi,
I want to write a matrix (n*m) in a file (Text file) such that the file
will be as Result file (below).
I use the below command but it write all numbers in one column,
> write(paste(matrixname),file="test.txt",append=TRUE)
how can I do this?
Result file:
5 5 -1 -1 -1 -1
8 8 2 7 6 5
6 6 8 2 7 5
Matrix:
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 5 5 -1 -1 -1 -1
[2,] 8 8 2 7 6 5
[3,] 6 6 8 2 7...
2010 Oct 04
2
print-show-display a matrix
Hello.
I want to print the value a matrix has. The matrix's size is not too big
(100*100 cells). I tried print(matrixname) but as it does not fit very well on
my screen R splits it into several small matrixes that do overflow my screen.
IS it possible somehow to display this matrix as one (even if this needs to go
fullscreen) . There might be some function for that like plot cells or display
matrixes.
I would like...
2007 Sep 11
1
storing text and decimal values in a matrix form
Hi,
I would like to store some text and decimal values in the following
form:
name dec.val dec.val ... dec.val
name dec.val dec.val ... dec.val
...
name dec. val dec.val ... dec.val
To do so, I created a matrix of the necessary size (x row per y cols)
with the command
matrixname <- matrix(0,x,y)
and proceeded to fill in the matrix with information drawn from a
data frame.
The problem is that the resulting matrix only has integers at the end
of the filling process.
When I ask:
class(dataframename[i,j])
The answer is "factor"
What is the best way of solv...
2007 Sep 11
0
Odp: storing text and decimal values in a matrix form
...in the following
> form:
>
> name dec.val dec.val ... dec.val
> name dec.val dec.val ... dec.val
> ...
> name dec. val dec.val ... dec.val
>
> To do so, I created a matrix of the necessary size (x row per y cols)
> with the command
>
> matrixname <- matrix(0,x,y)
>
> and proceeded to fill in the matrix with information drawn from a
> data frame.
>
> The problem is that the resulting matrix only has integers at the end
> of the filling process.
>
> When I ask:
> class(dataframename[i,j])
> The answer is...