Displaying 5 results from an estimated 5 matches for "100x5".
Did you mean:
100,5
2000 Nov 16
2
assign names to matrix
dear all,
i have a matrix and i dont know how to assign names to this matrix.
given v is 100x5 matrix, and label -> c("A","B","C","D","E")
idealy, names(v) <- label, but it doesnt work for different length
if dimnames(v) <- list(1:nrow(v),label), then names(v) return NULL
any smart ways? thanks in advance.
best regards
pan yuming...
2009 Jan 21
1
A question on histogram (hist): coordinates on x-axis are too sparse
...'s say I have some data X,
X <- runif(1000, 1, 10000000000)
pdf('X.pdf', width=100,height=5)
hist(X, breaks=1000)
dev.off()
I find that, on x-axis the coordinates are 0e+00, 2e+09, 4e+09, 6e+09, 8e+09, 1e+10. Only five numbers, which is too sparse in a 100x5 pdf file. I want the x-axis coordinates to become more dense, e.g. 0e+00, 1e+09, 2e+09, 3e+09,..... 8e+09, 9e+09, 1e+10. What argument (or function) should I revise to let this happen??
Thanks a lot!!
Best, Hua
***************************************************************************...
2011 Jan 05
1
RData size
Hi, I noticed a Rdata size issue that's puzzling to me. Attached find 2 example
datasets in text file. Both are 100x5, so the sizes for both text file are the
same. However, when I read them into R, the sizes are much different:
tt<-as.matrix(read.table("tt.txt",header=T,row.names=1))
save(tt,file='tt.RData')
tt.big<-as.matrix(read.table("tt.big.txt",header=T,row.names=1))
save...
2013 Apr 30
0
Ridge regression
...,]
which yields:
final$lag1 final$lag2 final$g
final$u
3.147255e-04 1.802505e-01 -4.461005e-02 -1.728046e-09 -5.154932e-04
Now, by changing my data set(final), I repeat the process 100 times and
obtain 100 such vectors which I store as 100 rows in a 100X5 matrix:
matrix[i,]=coef(reg)[best,] (i varying from 1 to 100)
Now my final estimates for the beta's are:
Beta_0=median(matrix[,1])
Beta_1=median(matrix[,2])
Beta_2=median(matrix[,3])
Beta_3=median(matrix[,4])
Beta_4=median(matrix[,5])
I want to find the p-values of each of the estimated be...
2006 Dec 29
5
coded to categorical variables in a large dataset
I am working with a dataset where there are 5 possible outcomes (coded 1:5),
I would like to create 5 categorical variables (event1...event5). I am using
a for loop an if statements, but I have a large dataset( approx 100,000
rows) it takes quite a bit of time, is there a way to speed this up? Here is
some sample code of what I am currently doing.
test2 <-rep(seq(1:5),2000)
event1 <-