similar to: Combine two matricies

Displaying 20 results from an estimated 2000 matches similar to: "Combine two matricies"

2012 Sep 24
6
Script to count unique values from two linked matricies
I hope you can help with this one. I have two matricies: 1. A species abundance matrix: <http://r.789695.n4.nabble.com/file/n4643979/2species_matrix.jpg> 2. A species trait score matrix: <http://r.789695.n4.nabble.com/file/n4643979/2trait_matrix.jpg> The trait matrix lists trait scores for each species as listed in the species abundance matrix. I would like to create a script
2000 Jan 04
1
correlation matricies: getting p-values?
I have to admit that I'm at a bit of a loss here; any pointers would be greatly appreciated. I've been making correlation matricies from some of my datasets, and have been instructed to get the probability values for each of these correlations. I've checked the online help for info on both the cor and cov functions, but I was unable to find any relevant info on finding how to obtain
2010 May 22
2
Regression with sparse matricies
I would like to run a logistic regression on some factor variables (main effects and eventually an interaction) that are very sparse. I have a moderately large dataset, ~100k observations with 1500 factor levels for one variable (x1) and 600 for another (X2), creating ~19000 levels for the interaction (X1:X2). I would like to take advantage of the sparseness in these factors to avoid using GLM.
2009 Jul 15
4
Change data frame column names
Hi R helpers, I have a data frame and I want to change the column names to names I have held in another data frame, but I am having difficulty. All data framnes are large so i can't input manually. Below is what i have tried so far: df<-data.frame(a=1:5, b=2:6, d=3:7, e=4:8) coltitles<-data.frame(v1="col number one", v2="col number two", v3="col number
2009 Jul 14
5
Nested for loops
Hi, I have spent some time locating a quite subtle (at least in my opinion) bug in my code. I want two nested for loops traversing the above-diagonal part of a square matrix. In pseudo code it would something like for i = 1 to 10 { for j = i+1 to 10 { // do something } } However, trying to do the same in R, my first try was for (i in 1:10) { for (j in (i+1):10) { //
2009 Sep 30
5
Rounding error in seq(...)
Hi, Today I was flabbergasted to see something that looks like a rounding error in the very basic seq function in R. > a = seq(0.1,0.9,by=0.1) > a [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 > a[1] == 0.1 [1] TRUE > a[2] == 0.2 [1] TRUE > a[3] == 0.3 [1] FALSE It turns out that the alternative > a = (1:9)/10 works just fine. Are there any good guides out there on how to deal
2009 Jul 22
5
Find multiple elements in a vector
Hi, Given a vector, say x=sample(0:9,10) x [1] 0 6 3 5 1 9 7 4 8 2 I can find the location of an element by which(x==2) [1] 10 but what if I want to find the location of more than one number? I could do c(which(x==2),which(x==3)) but isn't there something more streamlined? My first guess was y=c(2,3) which(x==y) integer(0) which doesn't work. I haven't found any clue in the R
2009 Jul 20
5
heatmap plot
Dear R community! I am trying to create a heatmap based on the following data. As you can see the diagonal (0,0 to 10,10) is always 0). If I run the heatmap command like i posted it I get a graph with horizontal lines. What is my mistake? > heatmap(activity.matrix, Rowv = NA, Colv = NA, scale="column", xlab="x Compounds", ylab="y Compounds",
2009 Jul 13
2
graph: axis label font
Hi, excuse me for my english, i am using R on windows and i have to do several graphs with axis labels and the axis text thicks has a specified font type, (Arial) and a specified font size. How can i do these? Thank you in advance -- View this message in context: http://www.nabble.com/graph%3A-axis-label-font-tp24463974p24463974.html Sent from the R help mailing list archive at Nabble.com.
2005 Mar 05
2
Bitrate Adaption
Hi, I've been reading through the Theora format spec and API reference trying to find an answer to this but haven't come across anything certain. I'm wondering whether it would be theoretically possible to change the encoded bit rate (or target video qiality) during a live stream without a standard theora decoder having any problems. I had assumed that this must be possible, given
2009 Jul 17
2
Re placing null values (#NULL!)
I am stumped. I have a data set with multiple columns and about 65,000 case. Some of the cases have a "#NULL!" value so for dataframe "Props_": access_emp pct_vacant TAVAIL park PARKACRES totlandare 4538 52.15 #NULL! 0 1 22.99 74,129.70400 4539 52.15 .09 0 1 22.99 982,850.80400 10292 54.20
2007 Jul 23
2
cmdscale question
Hi. I know matrices that use distances between places works fine when using cmdscale. However, what about matricies such as: A B C D E A 0 1 23 12 9 B 1 0 10 12 3 C 23 10 0 23 4 D 12 12 23 0 21 E 9 3 4 21 0 i.e. matrices which do not represent physical distances between places (as they would not make sense for real distances such as the one above)
2010 Mar 22
2
importing .bil files
Dear list Has anyone got a recipie at hand to import .bil files into R? From what I understand the .bil files I got contain layered matricies which I would lke to make available in R as an array or list. GIS people seem to be familiar with the .bil format but I am not using any GIS software and would prefer to deal with the data in R. I use the latest version of R on Mac OSX 10.5.8.
2009 Aug 13
2
randomForest question--problem with ntree
Hi, I would like to use a random Forest model to get an idea about which variables from a dataset may have some prognostic significance in a smallish study. The default for the number of trees seems to be 500. I tried changing the default to ntree=2000 or ntree=200 and the results appear identical. Have changed mtry from mtry=5 to mtry=6 successfully. Have seen same problem on both a Windows
2012 Oct 18
3
bigmemory for dataframes?
Hi Folks, I've been bumping my head against the 4GB limit for 32-bit R. I can't go to 64-bit R due to package compatibility issues (ROBDC - possible but painful, xlsReadWrite - not possible, and others). I have a number of big dataframes whose columns all sorts of data types - factor, character, integer, etc. I run and save models that keep copies of the modeled data inside the model
2009 Aug 17
6
graph label greek symbol failure
Readers, Previous questions about this requirement have been for m$ users, my failure occurs using linux. I have tried to add the delta (?) symbol to the y axis label and the result is &D, using the command: ...ylab="?t"... Any advice please? rhelp at conference.jabber.org mandriva 2008 r 251 (27-06-07)
2011 Jul 27
2
Use a list to 'transport' a collection of data sets and results
Hi Everybody I need to "transport" some data and results to use another application (Sweave via LyX - where debugging is very difficult) in order to build a report. Is it possible to store a collection of variables of different types (like named integers, matricies, data frames and two lists) all in one list and save it and then simply load it again later and "unpack" the
2003 Sep 24
1
storing objects (lm results) in an array
Hi I have calculated lots (>1000) of linear models and would like to store each single result as an element of a 3D matrix or a similar storage: something like glm[i][j][k] = lm(...) Since I read that results are lists: Is it possible to define a matrix of type list? Or what do you recommend? Many thanks Christoph -- Christoph Lehmann <christoph.lehmann at gmx.ch>
2009 Jul 13
1
Add grand mean to every entry in a matrix
Hi, I have a matrix: mymat <- matrix(runif(10*4), ncol=4) I wish to subtract the column means, down the colums, subtract the row means from the rows and add back the grand mean - all the means should be the means of mymat rather than of the new matrix. How can I do this? Any help much appreciated. Thanks Tom _________________________________________________________________
2009 Jul 16
5
Transformation of data!
Hi Colleagues, Could you please help? I get as the output of my calculations following [1] 0.000000e+00 1.890000e-04 3.933000e-05 1.701501e-04 2.040456e-04 [6] 3.119242e-04 2.545665e-04 1.893930e-03 1.303112e-03 9.880183e-04 [11] 1.504378e-03 1.549246e-03 5.877690e-04 4.771359e-04 8.528219e-04 How is it possible to transform the data to get a vector as following 10