Displaying 5 results from an estimated 5 matches for "thematrix".
Did you mean:
dgematrix
2007 Jan 25
1
poly(x) workaround when x has missing values
...poly(x, 2) : missing values are not allowed in 'poly'
The following function seems to be an okay workaround.
Poly<- function(x, degree = 1, coefs = NULL, raw = FALSE, ...) {
notNA<-!is.na(x)
answer<-poly(x[notNA], degree=degree, coefs=coefs, raw=raw, ...)
THEMATRIX<-matrix(NA, nrow=length(x), ncol=degree)
THEMATRIX[notNA,]<-answer
attributes(THEMATRIX)[c('degree', 'coefs', 'class')]<- attributes(answer)[c('degree', 'coefs', 'class')]
THEMATRIX
}
> lm( y ~ Poly(x,2) )
Call:...
2006 Mar 28
2
R crashes during 'eigen'
...hen I want to compute the eigenvalues & eigenvectors of a specific
matrix, R crashes (i.e. it stops responding to any input). I've tried it
with different versions of R (2.1.1, 2.2.0, 2.2.1) - all with crashing
as result.
What I did before the crash was:
M <- as.matrix(read.table("thematrix",header=T))
eigen(M)
If, instead of eigen(M), I use eigen(M, EISPACK=T), R doesn't crash. So,
I know a workaround my problem, but still don't understand why R
crashes. Could anyone explain this?
In case someone wants to download my matrix to see where it goes wrong,
it can be download...
2007 Nov 19
2
delete a row in a matrix
Can anyone tell me how to delete a row in a matrix? I have searched
around and couldn't find a straightforward way to do this.
Thanks, any help will be greatly appreciated.
Jennifer
[[alternative HTML version deleted]]
2004 Sep 30
3
Retrieving objects from functions...
I've written a program that involves a loop that creates a matrix. I'd
like to be able to manipulate that matrix on my R desktop, but after I
run the function, that matrix does not appear when I type ls(). How can
I make that matrix become an object that I can manipulate?
Thanks!
2004 Apr 30
5
Windows XP Pro and Samba (file saving)
Sometimes when I save a file to a samba-shared drive the application is
unable to save there and asks if the file is write protected or if the disk
is full.
If I then save it to a local drive and copy it there using Windows
Explorer, it can overwrite the file fine.
Do I need to make that myriad of changes to my XP Pro registry?
Most of the time it works fine, just from time to time it will give