similar to: Merge matrix

Displaying 20 results from an estimated 1000 matches similar to: "Merge matrix"

2011 Apr 13
1
Extracting selected rows from a matrix to a submatix
I have a matrix M > dim(M) [1] 30380   561 I have another list L contains , that contains some row names of matrix M str (L)  chr [1:21037] Now I want to extract the submatrix subM (21037    ,    561)  from the matrix M by matching the rownames (M) to the 21037 rownames o f L How do I do that ? Thanks and regards, Pankaj Barah   Pankaj Barah Department of Biology  Norwegian University
2011 Feb 08
2
Extrcat selected rows from a list
Hi, I have two lists 1) List1- 30,000 rows and 104 columns 2) List2- a list of 14000 selected rownames  from List 1 Now, I want to extract all the 104 columns of List1  matching with the 14000 selected rownames from List2.  Psedocode will be something like this: match rownames(List2) with rownames(List1) extract selected matched 104 coloumns from (List1) strore in-> List3 So the
2010 Nov 29
1
Extracting selected rows from a matrix
Hi, I have matrix of 104 columns and 30000 rows (Each Row has rowname). I have 13 different  list of selected rownames (character) say 1000 each. Now I want to extract the all the columns according to the rownames in each the list. How can I do that in R ? 1 ) For a single list 2) For all the 13 list at a time  Regards, Pankaj Barah Department of Biology,  Norwegian University of
2005 Nov 25
1
Use of nesting in lmer- error in numerical expression
Dear R users, I am trying to fit a GLMM using lmer to a dataset where the brood identity (LNRREIR) is nested within mothers identity. The reason for this is that each mother can have several nests within each year and also between years. I am running the following script (actually I have tried all different combinations with LNRREIR and mother): mod <- lmer(sr~z.hatchday +
2008 Oct 26
4
odd behaviour of identical
given what ?identical says, i find the following odd: x = 1:10 y = 1:10 all.equal(x,y) [1] TRUE identical(x,y) [1] TRUE y[11] = 11 y = y[1:10] all.equal(x,y) [1] TRUE identical(x,y) [1] FALSE y [1] 1 2 3 4 5 6 7 8 9 10 length(y) [1] 10 looks like a bug. platform i686-pc-linux-gnu arch i686 os linux-gnu system
2009 Aug 24
2
Number of CPU's
Any way to get access to the number of CPU's, optionally their type, from within R? In linux I can just read /proc/cpuinfo but for win/mac ? Thanks! H?vard -- H?vard Rue Department of Mathematical Sciences Norwegian University of Science and Technology N-7491 Trondheim, Norway Voice: +47-7359-3533 URL : http://www.math.ntnu.no/~hrue Fax : +47-7359-3524 Email: havard.rue
2010 Oct 04
0
glmer or not - glmer model specification
Hello, I'm having some trouble figuring out the correct model specification for my data. The system consists of multiple populations of an organism, which have been genetically sampled for several years. The problem is this: A minority of individuals are found in more than one sample, either they have survived into the next sampling at the same location, or have migrated to another another
2003 Feb 05
3
R as a `script'
is there any way i can use R as a tool for scripts in unix, as wotan[hrue]$ cat example.R #!/usr/bin/R x=1 havard -- Havard Rue Department of Mathematical Sciences Norwegian University of Science and Technology N-7491 Trondheim, Norway Voice: +47-7359-3533 URL : http://www.math.ntnu.no/~hrue Fax : +47-7359-3524 Email: havard.rue at math.ntnu.no
2006 Aug 03
2
efficient way to make NAs of empty cells in a factor (or character)
Dear all, I have some csv-files (originating from Excel-files) containing empty cells. In my example file I have four variables of different classes, each with some empty cells in the original csv-file: > test <- read.csv2("test.csv", dec=".") > test id id2 x y 1 a 1 NA 2 b e NA 2.2 3 f 3 3.3 4 c g 4 4.4 > class(test$id) [1]
2009 Mar 30
1
duplicated fails to rise correct errors (PR#13632)
Full_Name: Wacek Kusnierczyk Version: 2.8.0 and 2.10.0 r48242 OS: Ubuntu 8.04 Linux 32 bit Submission from: (NULL) (129.241.110.161) In the following code: duplicated(data.frame(), incomparables=NA) # Error in if (!is.logical(incomparables) || incomparables) .NotYetUsed("incomparables != FALSE") : # missing value where TRUE/FALSE needed the raised error is clearly not the
2017 Sep 20
4
arguments imply differing number of rows
Hi Team, I using the syntax as: data.df<- data.frame( city= c(rep(c("Delhi", "Bangalore","Chandigarh"),each=5)), population= c(4000:6000,3500:4300,3000:3200) ) But i am getting the error as arguments imply differing number of rows: 15, 3003. Tried searching google but could not understand & find the solution. Thanks, Shivi [[alternative HTML version
2005 Nov 30
1
SciViews-R_0.8-9 Console problem
Dear R users, I successfully installed SciViews the other day. However, when I try to run it now, the command/script window does not appear. Strange. Well, actually I see a tendency to a script window (in the lower part of the sciview window where it is suppose to be) during start up, but when the program is entirely open, the script window is gone. I have tried to uninstall and reinstall
2010 Jan 11
2
Documentation: format of read.table help text (PR#14180)
Dear R developers, I find the format of descriptions of the arguments in the read.table help text slightly inconsistent. For example, the logical arguments comes in seven different formats, more or less explicit about the consequences of a TRUE (or FALSE): 1. check.names logical. If TRUE then the names... 2. blank.lines.skip logical: if TRUE blank lines... 3. flush logical: if TRUE,
2008 Apr 29
2
help text for xlim
Dear R-developers, A student asked me today of how to specify the limits of the x-axis. I knew that he should use xlim, but I tried to encourage him to have a try himself with the various help functions. I do not judge if he used the correct search strategy or right key words, but anyway here is what he tried: he looked at ?plot. There xlim is not mentioned. He checked ?par. There you find
2017 Sep 20
0
arguments imply differing number of rows
4000:6000 gives you 4000, 4001, ..., 6000. I suspect you want population= c(seq(4000, 6000, length=5), seq(3500, 4300, length=5), seq(3000, 3200, length=5)) Bob On 20 September 2017 at 17:07, Shivi Bhatia <shivipmp82 at gmail.com> wrote: > Hi Team, > > I using the syntax as: > > data.df<- data.frame( > city= c(rep(c("Delhi",
2017 Jun 29
3
Help : glm p-values for a factor predictor
Hello, i am a newby on R and i am trying to make a backward selection on a binomial-logit glm on a large dataset (69000 lines for 145 predictors). After 3 days working, the stepAIC function did not terminate. I do not know if that is normal but i would like to try computing a "homemade" backward with a repeated glm ; at each step, the predictor with the max pvalue would be
2009 Mar 23
2
dput(as.list(function...)...) bug
Tested in R 2.8.1 Windows > ff <- formals(function(x)1) > ff1 <- as.list(function(x)1)[1] # ff1 acts the same as ff in the examples below, but is a list rather than a pairlist > dput( ff , control=c("warnIncomplete")) list(x = ) This string is not parsable, but dput does not give a warning as specified. > dput( ff ,
2008 Nov 10
6
Variable passed to function not used in function in select=... in subset
Hello! I have the problem that in my function the passed variable is not used, but the variable name of the dataframe itself?- difficult to explain, but an easy example: TestFunc<-function(df, group) { ??? print(names(subset(df, select=group))) } df1<-data.frame(group="G1", visit="V1", value=0.9) TestFunc(df1, c("group", "visit")) Result: [1]
2008 Jul 01
5
trivial list question
Dear experts, For the makeGenotype function I need a list as in the example. However, since my list needs to be 184 long there must be an easy way to make it. >list(1:2,3:4,5:6,7:8) [[1]] [1] 1 2 [[2]] [1] 3 4 [[3]] [1] 5 6 [[4]] [1] 7 8 I have tried lis<-1:184 dim(lis)=c(92,2,1) as.list(lis) and several other options. Any suggestions? many thanks Marco [[alternative
2018 Apr 24
0
How to visualise what code is processed within a for loop
The loop never assigns anything to d0, only t. The first line makes t a character string "d0$V1" (or "d0$V2" etc.). The second line assigns either 0 or 1 to t. Looking at this, I don't think you've got into the R psychology (bad news if you want to use R, good news in many other ways). I assume d0 is a list, so could you put the V's into a vector, and then just use