similar to: merge large matrices

Displaying 20 results from an estimated 10000 matches similar to: "merge large matrices"

2005 Jun 07
6
transform large matrix into list
Dear List I need to transform a large matrix M with many NAs into a list L with one row for each non missing cell. Every row should contain the cell value in the first column, and its coordinates of the matrix in column 2 and 3. M: x1 x2 y1 1 2 y2 4 5 y3 7 8 L: v x y 1 1 1 4 1 2 7 1 2 2 2 1 5 2 2 8 2 3 I'm trying to do this with a loop, but since my matrix is quite large (around
2011 Nov 02
1
problem with merging two matrices
Dear all, I hope you can forgive me my stupid questions, but I am a very new R user (; So, this is my question: I have two matrices, those are: matrix1 <- matrix(cbind(vector1, vector2), 1,2, dimnames = list(c("values"), c("T value", "p value"))) matrix2 <- matrix(dcbind,2,6,dimnames =
2006 Oct 02
1
finding correlation between two matrices
Dear all, I would like to compare two distance matrices to find the correlation between those and create a XY plot.could you please kindly help me and let me know how I can do that using R.(Mantel test?). Your help is very much appreciated!! Many thanks! Regards, Sima Fakheran ............................................................... Sima Fakheran Esfahani PhD Student Institute of
2012 Feb 02
4
an unusual use for R
I thought some of you might be amused by this. In my non-work time, I'm an avid weaver and teacher of weaving. I'm working on a project involving creating many detailed weaving patterns, so I wrote R code to automate it. Details here: http://stringpage.com/blog/?p=822 If the overlap between R users and avid tablet weavers turns out to be >> 1, I'll polish it up and turn it
2006 Mar 26
3
merge two vectors of the same length into one?
Dear all, I have a question about merge two character vectors of the same length into one. For example: X= c('A', 'B', 'C', 'A', 'D', .......) # 26 possible alphabet values with length 1000 Y=c('B', 'A', 'C', 'A', 'C', ........) # 26 possible aphabet values with length 1000
2010 Feb 13
3
how to do calculations in data matrices?
Please give me just a reference where I can find something useful. In summary, I need to : - find the median of each row of a matrix - create a new matrix with each value in the first matrix divided by the median of its row - if a value "a" in the second matrix is < 1, I need to substitute it with 1/a I know that for some of you it must be overeasy, but I swear I googled for two
2013 Mar 28
2
Can R read in .xyz files
Hi, Can R read in .xyz files? If so, what is the package, thanks -- Shane [[alternative HTML version deleted]]
2013 Jan 29
3
Can I define a object array in R?
Here is my problem, 100 decision trees were built(similar to random forest) and I want to replace some of them by new trees. How can I define a tree array including 100 trees, i.e. t[100], and every t[n] is an "C5.0" object, such that when a new tree comes, i can do n<-10 t[n]<-C5.0(...) -- View this message in context:
2016 Apr 15
1
Decision Tree and Random Forrest
I need the output to have groups and the probability any given record in that group then has of being in the response class. Just like my email in the beginning i need the output that looks like if A and if B and if C then %77 it will be D. The examples you provided are just simply not similar. They are different and would take interpretation to get what i need. On Apr 14, 2016 1:26 AM,
2013 May 16
1
connect to local mySQL database
Hi, I would like to access a local mysql database. In python using the sqlite3 library it is quite straightforward. I just have to pass the path to the sqlite-file; sqlite3.connect('.../xy.sqlite') Is there something similar in R (or specifically in the RMySQL package)? It seems like I have to use the MySQL function in the RMySQL package in order to ... "initializes a MySQL
2012 Jul 10
2
how can I show the xlab and ylab information while using layout
hi R-users: I want to draw three plot into one figure by layout and the script has been shown below. But I find R does not show the xlab and ylab information completely as shown the figure attached. How can I midify the script.? thank you . xxlab<-paste(cpmd," (",ro,"%)",sep=" ") yylab<-paste(rfmd," (",co,"%)",sep=" ")
2006 Mar 27
5
How to create a directoy with R
Hello, I am trying to create directories with R. I would like R to create directories because it is platform independent. I tried using file() and searching in "R Data Import/Export" but I did not succeed. I think it must be some function since exists the unlink to remove directories (and files). Pau
2011 Dec 03
4
Data alignment
Hello! I have a data.frame which looks like: Name - Value A - 400 A - 300 B - 200 B - 350 C - 500 C - 350 D - 450 D - 600 E - 700 E - 750 F - 630 F - 650 I want to add another column where all A,B should get an index 1, all C,D an index of 2 and all E,F an index of 3 so that the data.frame looks like: ID - Name - Value 1 - A - 400 1 - A - 300 1 - B - 200 1 - B - 350 2 - C - 500 2 - C - 350 2
2009 Dec 22
3
vector indexing problem in multilevel data: assigning a specific value to all group members
Dear List, I work with multilevel data from psychological group experiments and have frequently encountered a situation for which I haven't found an elegant solution: I need to assign the value of a specific group member to all members of the group. For example, I have a group leader (identified by a binary vector) and some attribute for all group members. I want to create a new
2012 Nov 22
4
Data Extraction
Hello, I would appreciate if someone could help me resolve the following: 1. df1[!is.na( X1 | X2 | X3 | X4 | X5),][,1:5] # This does not work 2. Is these message harmful? The following object(s) are masked from 'df1 (position 3)': X1, X2, X3, X4, X5 Thanks, Pradip Muhuri #Reproducible Example set.seed(5) df1<-data.frame(matrix(sample(c(1:10,NA),100,replace=TRUE),ncol=5))
2016 Apr 14
3
Decision Tree and Random Forrest
I still need the output to match my requiremnt in my original post. With decision rules "clusters" and probability attached to them. The examples are sort of similar. You just provided links to general info about trees. Sent from my Verizon, Samsung Galaxy smartphone<div> </div><div> </div><!-- originalMessage --><div>-------- Original message
2018 May 30
0
par(mfrow=c(3,4)) problem
Hi, You're mixing base plot and ggplot2 grid graphics, which as you've discovered doesn't work. Here's av strategy that does: https://cran.r-project.org/web/packages/egg/vignettes/Ecosystem.html This vignette has a good overview, well as info specific to that package. Sarah On Wed, May 30, 2018 at 4:43 AM greg holly <mak.hholly at gmail.com> wrote: > Hi all; >
2012 Mar 02
2
Spacing of text does not match spacing of bars in barplot
I have a very standard barplot. My labels are too long to be printed horizontally under each bar, so I am using text to put the labels on a 45 degree slant. However, the labels are spaced more narrowly than the bars, so on an 8 vertical bar plot, the end of the eighth label is lined up with the seventh bar. Preferably I don't want to do every text label separately (I'm having this
2016 Apr 15
0
Decision Tree and Random Forrest
Since you only have 3 predictors, each categorical with a small number of categories, you can use expand.grid to make a data.frame containing all possible combinations and give that the predict method for your model to get all possible predictions. Something like the following untested code. newdata <- expand.grid( Humidity = levels(Humidity), #(High, Medium,Low)
2012 Feb 06
3
Duplicate rows when I combine two data.frames with merge!
Hello all, First I have done extensive searches on this forum and others and nothing seems to work. So I decided to post thinking someone could point me to the write post or give me some help. I have drawn a 100 samples from a fictitious population (N=1000), and then randomly selected 25% of the 100 samples. I would like to now merge the data.frame from the 100 samples with the data.frame for