similar to: search through a matrix

Displaying 20 results from an estimated 6000 matches similar to: "search through a matrix"

2011 Feb 01
1
using SNOW and clusterApplyLB to run jobs parallel
I have this function and want to run it parallel with different sets of data. Using SNOW and clusterApplyLB. system.time(out <- mclapply(cData, plotGraph)) #each cData contains 100X6000 doubles system.time(out <- mclapply(cData2, plotGraph)) system.time(out <- mclapply(cData3, plotGraph)) system.time(out <- mclapply(cData4, plotGraph)) system.time(out <- mclapply(cData5,
2009 Apr 22
2
Exporting objects plotted with plot3d() - rgl package
Dear all, Can anybody tell me how to export a 3d figure made with the plot3d function? I'm careless about whether it's still interactive or not in another format, as long I can get it out of R. Thanks! Alejandro Gonz?lez Departamento de Biodiversidad y Conservaci?n Real Jard?n Bot?nico Consejo Superior de Investigaciones Cient?ficas Claudio Moyano, 1 28014 Madrid, Spain Tel +0034
2009 Jun 18
3
how to sort
Hi. I have an object. I think it is a list. > str(corTFandPCA) num [1:922, 1:5] -0.0226 -0.0504 -0.0208 -0.0582 -0.0257 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:922] "abdomen.2" "abdomimal.3" "abdominal.4" "aberration.5" ... ..$ : chr [1:5] "PC1" "PC2" "PC3" "PC4" ... I want to order it
2009 Mar 14
2
permutations in R
Hi. Does anyone know of a function which will take as input a number n (or a set of n letters) and will give out, one at a time, the permutations of n (or of those n letters) as a vector? So that I can use the permutations one at a time. And such that it will exhaust all the permutations with no repeats. For example if n is 3, I would want a function which I could use in a loop and the first time
2011 Jan 28
1
Please help -- Converting a 2D matrix to 3 columns for graphical representation
Hi, I am trying to convert a 2D correlation matrix to 3 columns for graphical representation: rdata = replicate(100, rnorm(15)) #construct a 2D matrix c1 = cor(rdata) #outputs a correlation matrix Now I want to convert the 2D c1 to (row#, col#, correlation) 1 1 cor1 1 2 cor2 1 3 cor3 ... 2 1 cor.. Is there a way to do this? The main reason I am doing this is to find a correlation based graph
2004 Apr 05
3
2 lme questions
Greetings, 1) Is there a nice way of extracting the variance estimates from an lme fit? They don't seem to be part of the lme object. 2) In a series of simulations, I am finding that with ML fitting one of my random effect variances is sometimes being estimated as essentially zero with massive CI instead of the finite value it should have, whilst using REML I get the expected value. I guess
2009 May 24
2
accuracy of a neural net
Hi. I started with a file which was a sparse 982x923 matrix and where the last column was a variable to be predicted. I did principle component analysis on it and arrived at a new 982x923 matrix. Then I ran the code below to get a neural network using nnet and then wanted to get a confusion matrix or at least know how accurate the neural net was. I used the first 22 principle components only for
2009 Apr 05
3
number of zeros in a matrix -row by row
Hi. I have an n x m matrix M some of who's entries are zeros. I want to know how many zeros there are in each row -perhaps stored in a 1 x n vector which lists the number of zeros for each row of M. Before I had a vector V and I was able to get the number of zeros in V by doing length(V[ V==0]) but when I try something similar for M, like M[ M==0] it creates a vector not a matrix and so
2009 May 02
2
any suggestions on this error?
Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, : invalid 'ncol' value (too large or NA) the statement was: for (i in v) {for (j in m[0,]){if(v[i]==m[0,j]){M[,-j]}}} where 'v' is a vector, and 'm' and 'M' are both matrices. -- View this message in context:
2009 Jun 19
2
meaning of glm(value ~ .,
I am trying to build a glm model with many inputs. I saw the following code in Rattle crs$glm <- glm(value ~ ., data=crs$dataset[,c(1:59,922)], family=binomial(link="logit")) I am not clear about what value ~ . means and also, I see data=crs$dataset[,c(1:59,922)] I have read that the data argument is optional here "an optional data frame, list or environment (or object
2009 Nov 01
4
convert list to Dataframe
Hi. I have a huge list called twitter: > dim(twitter) NULL > str(twitter) List of 1 $ :Classes 'PlainTextDocument', 'TextDocument', 'character' atomic [1:35575] 11999;10:47:14;20;10;2009;ObamaLouverture;Trails Mixed Lessons For Governance From Campaigner-in-chief: President obama jumps campaign 09 tuesday..
2009 Apr 20
1
factanal error
Hi. I tried running the following code. I don't understand the error. mydata <- read.table("C:/dataForR/radiology/wordFrequencies.csv", header=TRUE, sep=",") > dim(mydata) [1] 982 924 mydataN<-mydata[,-923] > dim(mydataN) [1] 982 923 cor(mydataN) factanal(mydataN, factors=3) Error in solve.default(cv) : Lapack routine dgesv: system is exactly singular
2009 Apr 03
1
how to do this "the R way"
Hi. I am sure there is a better way in R to do this then using a loop but I am new to it and not sure what to do. I think it might be something about using a function as an argument but not sure. I have a 1 x 2000 vector TS2 which has entries from the set {x: x is in Z and 0<x<8} (where Z is the set of Integers). Then I also have a 5050 x 7 matrix called 'perm' whose entries are
2009 Apr 24
1
deleting rows provisionally
I have an object. I think it is a matrix, called 'answer2' str(answer2) int [1:1537, 1:2] 1 399 653 2 3 600 4 5 271 870 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:1537] "a4.1" "hirschsprung.399" "peritoneal.653" "abdomen.2" ... ..$ : chr [1:2] "row" "col" I want to delete rows that have the same entries.
2009 May 08
1
if ((x >.2 || x<(-.2)) && (col(x)!=row(x))) {x=x[,-col(x)]}
Hi. I have a correlation matrix 'x' which is of size 923x923 I need to remove variables that are highly correlated. I don't have a sophisticated way of selecting which of the two in a highly correlated pair to remove. I thought I would just go through each entry of the correlation matrix and if it is greater than 0.6 (or less than -0.6) I will remove that column and then redo the
2012 Jan 08
2
cannot find package in Packages>>Install Packages
Hi. I am trying to install a package called DMwR http://cran.r-project.org/web/packages/DMwR/index.html located here: http://cran.r-project.org/bin/windows/contrib/r-release/DMwR_0.2.1.zip on windows 7. I am using R 2.10.1. I also tried typing something like this but it did not work well. install.packages(c(" http://cran.r-project.org/bin/windows/contrib/r-release/DMwR_0.2.1.zip
2010 Apr 15
2
r-loop
HI, Dear community, I am building the following loop, ww<-function(file) { lossw<-vector() for (x in seq(0.1, 0.9, by=0.1)) { cat('xweight ', x, '\n') lossw[i] <- cross.validation(file, x)$avg } return(lossw) } MY question is how to index the lossw[i]? for (i in 1:9) for (x in seq(0.1, 0.9, by=0.1)) Thanks so much!
2010 May 14
2
help color coding map in R
I am trying to create a map with selected states based on highest to lowest mean cost. The following code properly selects the correct states, and the legend is properly color coded with ranges, but the colors per range does not match the state colors. I need help getting the state colors to match the ranges outlined in the legend. I have tried ordering the mean amounts and this correctly creates
2010 Feb 11
2
Unexpected output in first iteration of for-loop
Dear r-helpers, why do I get an output in the first iteration of the for-loop which contains the string values of the input vector, and how can I avoid that? Here's the output (only line 1 is wrong) latentVariable Indiv Group 1 rPlanning rIterat rTDD 2 rPlanning 0.79 0.84 3 rIterat 0.79 0.83 4 rTDD 0.9 0.96 5 rStandup 0.83 0.82 6
2001 Feb 21
2
openssh-2.5.1p1 problem on redhat 6.2
Hi, I built rpm from openssh-2.5.1p1 srpm on redhat 6.2, then installed it. When trying to ssh from other machine, sshd gives error: ..... Feb 20 17:54:24 foo PAM_pwdb[925]: (login) session opened for user doe by LOGIN(uid=0) Feb 20 17:55:15 foo sshd[1342]: Connection closed by 192.168.0.3 Feb 20 17:55:43 foo sshd[1343]: PAM unable to dlopen(/lib/security/pam_stack.so) Feb 20 17:55:43 foo