Displaying 11 results from an estimated 11 matches for "colc".
Did you mean:
col
2005 Sep 09
3
how to do something like " subset(mat, ("col1">4 & "col2">4)) "
Dear all,
I have a problem with the "subset()" function. I spent all day yesterday
with a collegue to solve it and we did not find a satisfying solution (even
in the archived mails), so I ask for your help.
Let's say (for a simple example) a matrix mat:
R> mat
cola colb colc
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9
My goal is to select the lines of the matrix on the basis of the values of
more than one column (let's say colb and colc).
For example I want to select all the lines of the matrix for which values in
colb and colc are more than 4.
I tried several ways that...
2009 Jul 12
2
Nonlinear Least Squares nls() programming help
Hi, I am trying to use the nls() function to closely approximate a vector of
values, colC and I'm running into trouble. I am not sure how if I am asking
the program to do what I think its doing, because the same minimization in
Excel's Solver does not run into problems. If anyone can tell me what is
going wrong, and why I'm getting a singular convergence(7) error, please
t...
2012 Jul 11
4
Help with loop
Hi,
I have two dataframes:
The first, df1, contains some missing data:
cola colb colc cold cole
1 NA 5 9 NA 17
2 NA 6 NA 14 NA
3 3 NA 11 15 19
4 4 8 12 NA 20
The second, df2, contains the following:
cola colb colc cold cole
1 1.4 0.8 0.02 1.6 0.6
I'm wanting all missing data in df1$cola to be replaced by the value of
df...
2011 Jun 10
2
Sorting Data Frame Without Loop
..."M-012847-00" ,"M-012847-00" ,"M-015544-00", "M-015544-00", "M-024202-00","M-024202-00")
colB <- c("NM_057175", "NM_057175", "NM_153008", "NM_153027", "NM_207330", "NM_207330")
colC <- c( 'NARG1', 'TBDN100', 'FLJ30277', 'FLJ31659', 'NIPAL1', 'NPAL1')
dupes <- data.frame(ProteinID=colA, GeneID=colB, GeneName=colC)
idVec <- character()
geneIDVec <- character()
geneNameVec <- character()
dataType <- "Prote...
2010 Dec 09
2
Reshape Columns
Hello,
I have a general formatting question. I have two columns of data:
ColA <- c("m", "m", "m", "m")
ColB<- c("d","d","d","d")
And I would like to reorder them into a new column that looks like this:
ColC<- c("m","d","m","d","m","d","m","d")
Thank you!
Stephanie
________________________________
PHRI DISCLAIMER
This information is directed in confidence solely to the person named above and may not otherwise be distr...
2005 Aug 22
3
read a table ignoring specific rows ?
Dear R users,
First of all sorry for this question, surely quite naive.
(I searched on the R site but was unable to find by myself).
I have a table, called infile :
1 2 3
4 5 6
7 8 9
I would like to read it and ignore the rows with 1st element > 3
I do it now with a for loop, and it's ok,
but I was expecting something simpler, like :
intable = read.table(infile);
newtable =
2004 Jun 09
1
network query
...the moment. What I would like to do, is have PC1 as mine pc, PC2 for the wife and PC3 for our
kid.
With the above setup, would it be possible for each of the computers (pc1,pc2,pc3) to have their
host name be visible on the irc server. For example, at the moment, I have this:
Addy: genesis@cpc2-colc3-3-0-cust131.colc.cable.ntl.com
and I would like to have it, using the above setup:
Addy: genesis@pulse.kevinsworld.com
Anyone able to help me out?
regards
Kevin
2012 Jul 11
1
sapply question
Why does this sapply code change df3 but not df1?
Thanks
df1 <- read.table(text="
cola colb colc cold cole
1 NA 5 9 NA 17
2 NA 6 NA 14 NA
3 3 NA 11 15 19
4 4 8 12 NA 20
", header=TRUE)
df2 <-df1*2
df1
df2
df3 <-sapply(names(df1),function(x) {df1[[x]]<- df2[[x]]})
df1
df3
[[alternative HTML version deleted]]
2015 Feb 24
2
intercalar elementos de vectores
...procesar toda la
> tabla que tienes:
>
> > #Creo un data.frame de ejemplo todo con letras
> > vtmp <- as.data.frame(lapply(letters,function(x) { rep(x,each=50) }))
> > names(vtmp) <- paste("col",LETTERS,sep="")
> > head(vtmp)
> colA colB colC colD colE colF colG colH colI colJ colK colL colM colN
> colO colP colQ colR colS colT colU colV colW colX colY colZ
> 1 a b c d e f g h i j k l m n
> o p q r s t u v w x y z
> 2 a b c d e f...
2015 Feb 24
2
intercalar elementos de vectores
Excelente! Ahora corre muy rápido. No conocía ese método, creo que me va a
resultar muy útil.
Muchas gracias y saludos.
Fernando Macedo
El 24/02/15 a las 10:51, Jorge I Velez escribió:
Fernando,
Podrias intentar
R> a <- rep('a', 5)
R> b <- rep('b', 5)
R> a
[1] "a" "a" "a" "a" "a"
R> b
[1] "b"
2012 Jul 14
3
Can't understand syntax
OK, I need help!!
I've been searching, but I don't understand the logic of some this
dataframe addressing syntax.
What is this type of code called?
test [["v3"]] [is.na(test[["v2"]])] <-10 #choose column v3 where column v2
is == 4 and replace with 10
and where is it documented?
The code below works for what I want to do (find the non-missing value in a
row),