Displaying 20 results from an estimated 3000 matches similar to: "Extracting columns with specific string in their names"
2008 Dec 16
1
renaming factor-labels / add factors etc.
Hi,
how can I change a defined factor-variable?
Like adding levels, renaming existing levels or merge several levels
of a factor to one level?
For example; following factor-variable is given:
x <- factor(c("xyz1", "abc1", "xyz2", "abc2"))
How can I add the level fgh?
And how can I merge "xyz1" and "xyz2" to one level?
And
2007 Oct 25
2
Find duplicates and save their max value
Hi,
maybe someone can help me with this:
I have a matrix of genes and values:
GeneName Value
Abc1 10
Abc2 11
Bbc1 -5
Bbc31 2
Ccd 5
Ccd -2
Ccd 7
Dda 5
Dda 10
..... .....
Zzz3 -1
I would like to
2005 Nov 11
1
conditional coloring of image labels
Hi all,
I am interested in plotting a heatmap of a set of genes. I would like the
text labels of these genes to be colored red rather than black if they meet
certain statistical criteria (using an if statement). I'm not sure how to
change individual color labels without changing them all. Can anyone provide
some insight on how to do this?
Thanks in advance,
Jake
2002 Oct 18
4
code to turn T into TRUE
Does anyone have code that will methodically process R sourcecode, turning
T's into TRUE and F's into FALSE? I got bored doing this by hand, after the
first 30-odd functions-- there are hundreds left to do. I don't want to
simply deparse everything, because that would destroy my beautiful
formatting.
The reason it's not trivial, is that comment lines, quotes, and split lines
need
2013 Feb 16
1
[LLVMdev] A weird problem when try to output operand of instruction involving function pointer in a struct
Hi all,
I just start to learn llvm. I am trying to get the operand's name of some
instruction that invokes a function field of a struct. While, I found in
the result that there is a sequence number attached to the function field
name. Below is an example:
/******source code t2.c*******/
#include <stdio.h>
void F(){printf("F\n");}
void E(){printf("E\n");}
void
2014 Jun 16
2
Print files which would be transfered by rsync (when syncing two directories)
Hi together,
after I read "very often" without even a tiny bit of a contradiction, I
start to have the feeling I have a basic misunderstanding of rsync.
Assume one want to get a list of files which would have been transfered
by rsync if rsync was requested to sync directories X and Y and one does
<code>
X=`mktemp`
echo "abc" > $X/1
echo "abc1" > $X/2
2009 Aug 06
1
problem with recording numeric output into another dataframe
dear all,
I have two dataframes
dataframe1
ID
a
b
c
dataframe2
ID value
a;W 100
X;c 200
Y;Z 300
I wanted to match the IDs from the two dataframes and record the values into
a new column of dataframe1 at the corresponding rows. This is what I expect:
dataframe1
ID value
a 100
b
c 200
I tried doing it like this:
for (i in seq(1:nrow(dataframe1))) {
2010 Feb 10
2
Subscripting
Dataframe1 contains a list of specific dates. Dataframe2 contains a large
dataset, one element of which is Date. How do I create a subset of
Dataframe2 that excludes the dates from Dataframe1? I know how to do it with
a left outer join vs null in SQL, but I can't figure out how to do it more
directly via the subcripts that already exist?
Dateframe1
Date
1/1/2010
1/18/2010
Dataframe2
Date
2008 Oct 22
3
Substitute problem
hello R users,
I didn't find a solution for a special problem.
I have two dataframes.
dataframe1:
X value row col ID
1 8.973498062 5512625 3460000 1
2 11.656658570 5501625 3464000 2
3 11.121777570 5495625 3473000 3
4 9.310465964 5508625 3477000 4
5 8.883483845 5515625 3496000 5
dataframe2:
X value
2011 Jun 14
1
[Resolved] combine the data frames into comma separated list.
Hi
Thanks Gabor for your suggestion. I am posting the code that worked for me.
dataframe1 = data.frame(cbind(Src = c(1,1,1,2,3), Target1 =
c('aaa','bbb','ccc','aaa','ddd'))); #must be data frame
dataframe2 = data.frame(cbind(Src = c(2,3,4,4,4), Target2 =
c('aaaa','dddd','bbbb','eeee','ffff')));
dataframe3 =
2006 Feb 20
2
glob2rx function not working
Dear R users,
Inspired by previous list discussion of the glob2rxc function, I am
attempting to create a new vector called TOTAL by summing all vectors
whose names begin with ABC:
TOTAL = sum(list = ls(pattern = glob2rx("ABC*")))
I'm running R 2.2.1 on Windows XP. Can anyone say what I'm missing?
Thank you, Mark
2018 Mar 12
0
subsetting comparison problem
> On Mar 11, 2018, at 3:32 PM, Neha Aggarwal <aggarwalneha2000 at gmail.com> wrote:
>
> Hello All,
> I am facing a unique problem and am unable to find any help in R help pages
> or online. I will appreciate your help for the following problem:
> I have 2 data-frames, samples below and there is an expected output
>
> R Dataframe1:
> C1 C2
2009 May 10
1
Select the rows in a dataframe that matches a criteria in another dataframe
Hi everyone! Thank you for the help you have been given to
me, and here I'm with another problem with my dataframes:
I have two dataframes (with much more observations), like
these:
Dataframe1
Firm Year cash
500400200 2007 100
500400200 2006 200
500400200 2005 400
500400300 2007 300
500400300 2006 240
500400300 2005 120
500400400
2002 Apr 30
1
data.frame package?
Is there a library that is able for example to
1. merge 2 dataframes by row eg.: rbind(dataframe1, dataframe2):data.frame
2. delete a column from a dataframe del(dataframe, colname) or
del(dataframe, colindex= 1):data.frame?
3. Select lines from a dataframe by a specific function ?
select(dataframe, func=small(x){x<1}, colindex=3): data.frame?
4. converting all double columns of a data.frame
2009 Aug 09
3
howto get the number of columns and column names of multiply data frames
Hi,
I' ve read in several files with measurements into R data frames(works
flawlessly). Each dataframe is named by the location of measurement and
contains hundreds of rows and about 50 columns like this
dataframe1.
date measurment_1 .... mesurement_n
1
2
3
..
..
..
n
For further processing I need to check whether or not ncol and colnames are
the same for all dataframes.
Also I need to
2008 Oct 27
3
Arrays of Trellis plots
hello,
the example below does not work. (i know it's not supposed, but it makes it
clear what i'm trying to achieve)
par(mfrow=c(2,1))
xyplot(y~x2|x1,data=dataframe1,pch=20)
xyplot(y~x2|x1,data=dataframe2,pch=20)
i know i could probably merge the two datasets and do something like
xyplot(y~x2|x1+dataset,data=merged)
any other suggestion?
thanks.
[[alternative HTML version deleted]]
2007 Feb 23
2
Extracting a subset from a dataframe
Good day everyone,
Can anyone suggest an effective method to solve
the following problem:
I have 2 dataframes D1 and D2 as follows:
D1:
dates ws wc pwc
2005-10-19:12:00 10.8 80 81
2005-10-20:12:00 12.3 5 15
2005-10-21:15:00 12.3 3 15
2005-10-22:15:00 11.3 13 95
2005-10-23:12:00 12.3 13 2
2005-10-24:15:00 10.3 2 95
2005-10-25:15:00 10.3 2 2
D2:
2007 Jul 11
2
Previously saved workspace restored
hi there,
i an beginner of R. some one have sent me a file (extension is .Rdata). i have installed R in my computer and i just double clicked the data. then it automatically opened R programme and displayed that [previously saved workspace restored]. the following message was displayed.
Type 'demo()' for some demos, 'help()' for on-line help, or'help.start()' for an
2013 Jan 25
2
How to name the elements of list
HI,
I have the array list:
X<-vector("list", 2)
X[[1]] : data frame 1
X[[2]]: dataframe2
now i want to change index 1 and 2 into: "0-10" , "11-20" ,.
finally I want to have
X[["0-10"]]:dataframe1
X[["11-20"]]:dataframe2
how do I get them?
Thanks a lot.
Kind regards,
Tammy
[[alternative HTML version deleted]]
2018 Mar 11
4
subsetting comparison problem
Hello All,
I am facing a unique problem and am unable to find any help in R help pages
or online. I will appreciate your help for the following problem:
I have 2 data-frames, samples below and there is an expected output
R Dataframe1:
C1 C2 C3 C4...... CN
R1 0 1 0 1
R2 1 0 1 1
R3