Hi:
Apologies for asking the following question. As this may sound very basic and
stupid for this forum , I honestly do not know how to solve it and I do not
have a teacher who can help me understand.
I have list of genes (200) that are involved in a particular process and I call
this as a
Hi:
sorry for asking simple question (not simple for me though).
I have a data frame something like this:
ExpName Identifier value
MM1-x1 GSK 0.02
MM1-x1 GSK2 0.001
MM1-x1 GSK3 0.04
MM1-x1 GSK4 0.1
MM1-X2 GSK 0.4
MM1-X2 GSK2 0.1
MM1-X2 GSK4 0.002
MMX-X3 GSK 0.4
MMX-X3 GSK2 0.23
I am
hi I need help with list object.
I have a list object
a - c('apple','orange','grape')
b - c('car','truck','jeep')
c - list(a,b)
names(c) - c('fruit','vehicle')
c
$fruit
[1] apple orange grape
$vehicle
[1] car truck jeep
I want to write all the elements of this list in one object
Thank you. that was very easy.
-srini
--- On Thu, 8/11/11, R. Michael Weylandt michael.weyla...@gmail.com wrote:
From: R. Michael Weylandt michael.weyla...@gmail.com
Subject: Re: [R] help with loops
To: Srinivas Iyyer srini_iyyer_...@yahoo.com
Cc: r-help@r-project.org
Date: Thursday, August 11
Hi group,
How can I identify an element with max value among duplicated elements all in a
data frame
Example:
x1
x1 x2
1 a 4
2 b 3
3 c 2
4 a 1
5 c 2
6 f 3
7 g 4
8 f 5
I want to be able to get a data frame with all unique(x1) with max value
x1 x2
1 a 4
2 b 3
3 c 2
a 4
2 b 3
3 c 2
4 a 1
5 c 2
6 f 3
7 g 4
8 f 5
aggregate(x$x2, list(x$x1), max)
Group.1 x
1 a 4
2 b 3
3 c 2
4 f 5
5 g 4
On Thu, Oct 23, 2008 at 8:30 PM, Srinivas Iyyer
[EMAIL PROTECTED] wrote:
Hi group,
How can I identify
Dear group,
I have 3 different data frames. I want to merge all 3
data frames for which there is intersection.
Say DF 1 and DF2 has 100 common elements in Column 1.
DF3 does not have many intersection either with DF1 or
with DF2.
For names in column 1 not present in DF3 I want to
introduce
Dear group,
I have a dataframe (x). (4 rows, 3 columns for
example)
I want to create a master list (my_list) from data
frame.
I want each row of x to be a list.
I tried 3 different ways: writing a loop, using apply,
and going through each row.
Going through each row works for me. since I
Dear Group,
I have a data frame like the following:
x - c(Mike,A,0.01)
x1 - c(Carl,A,0.2)
x2 - c(Gene,C,0.3)
x3 - c(James,A,-0.3)
x4 - c(Dough,B,0)
xx - rbind(x,x1,x2,x3,x4)
colnames(xx)-c(Name,Class,NES)
xx -as.data.frame(xx)
xx
Name Class NES
x Mike A 0.01
x1 Carl A 0.2
x2
--- Henrique Dallazuanna [EMAIL PROTECTED] wrote:
Perhaps in this case:
noquote(with(xx, tapply(NES, list(Class, Name),
paste)))
On 12/03/2008, Srinivas Iyyer
[EMAIL PROTECTED] wrote:
Dear Group,
I have a data frame like the following:
x - c(Mike,A,0.01)
x1 - c(Carl,A,0.2
Hi I have the smililar question.
I have a list:
my_list - list(name=Fred, wife=Mary,
no.children=3, child.ages=c(4,7,9))
my_list
$name
[1] Fred
$wife
[1] Mary
$no.children
[1] 3
$child.ages
[1] 4 7 9
Now I want to search Fred and get attribute of that
value which is 'name'.
how do I
Dear group,
I have a data.frame (d1) with various elements and a
matrix (m1) created with NA (or 1s). I want to read
each row,column in d1 and fill its numeric value in
m1.
Could some one help me because I have 130K rows and
500 column data.frame object and I was told that a for
loop will take a
Dallazuanna [EMAIL PROTECTED] wrote:
Try this:
d1 - data.frame(d1)
d1$V3 - as.numeric(as.character(d1$V3))
xtabs(V3 ~ r1+c1, data=d1)
You can substitute 0 with NA:
d1.tb - xtabs(V3 ~ r1+c1, data=d1)
d1.tb[d1.tb==0] - NA
On 24/01/2008, Srinivas Iyyer
[EMAIL PROTECTED] wrote
hello:
I am very confused when it comes to list operations in
R.
I seek help in the following problem.
I have two different vectors
myIDs - a character vector with no names to their
elements
x2 - another character vector derived from unlisting a
list where an element has both a name and
14 matches
Mail list logo