Try looking at ?merge
If your data is in two dataframes df1 and df2:
merge(df1, df2)
(This will merge on SNPID because that column is common to both
dataframes).
---
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Morassa Mohseni
Sent: 24 August
Hi Tom
It looks as if you are reading in genepix files. I believe the format for the
start lines includes a second line to say how many lines to skip. Something
like this, specifying 27 lines to skip:
ATF 1
27 43
Type=GenePix Results 1.4
DateTime=2003/11/14 17:18:30
If
Something like:
# Sample data
g1-c(gene1, gene2, gene3, gene4, gene5, gene9, gene10,
geneA)
g2-c(gene6, gene9, gene1, gene2, gene7, gene8, gene9,
gene1, gene10)
df1-cbind(gene=g1, expr=runif(length(g1)))
df2-cbind(gene=g2, expr=runif(length(g2)))
# Merge
mdf-merge(df1, df2, by=gene, sort=T)
#
Hi
If you enter the command ls()you will see a list of names that have
come with the .Rdata file you double-clicked.
If you enter one of these names at the command prompt you will see the
data.
So, for example if you have some data called mydata:
ls()
[1] mydata repos
mydata
[,1]
Hi
In what way does it not work?
My guess is that you have not declared your values outside the for loop.
As they are local they will be lost on exit.
You need to declare them before:
ewma-vector(length=12)
standard-vector(length=12)
for ... {
}
John Seers
---
Hi, I
Hi
I think a for loop would be more what you want.
Something along the lines of:
V-list(a=c(1,2,3), b=c(2,3,4)) # list of 2 vectors
for ( i in 1:2 ) { # 2 vectors (replace with 85 ...)
print(range (V[i], na.rm = TRUE))
}
Regards
JS
---
-Original Message-
From:
: 28 June 2007 15:12
To: john seers (IFR)
Cc: R Hilfe
Subject: Re: [R] Repeat if
Hello John,
I tried this code. But I got only the ranges of V1 and V2 what is easily
understandable.
Do I have to write in all 85 vectors in the first line?
V-list(a=c(V1), b=c(V2))
for ( i in 1:85 ) { # 2
tt-read.table(C:/temp/test.csv, header=T, sep=,)
# Try:
tt$x
tt$y
# OR
tt[x]
tt[y]
# OR
tt[[x]]
tt[[y]]
# OR
tt[1]
tt[2]
tt[[1]]
tt[[2]]
# Is this what you want?
I have an Excel file with x-y data. I saved this file as a cvs file.
Then I
used the read.table() function to read the
Hi
I do not know if this is the best way, but have a look at .Rprofile - a
text file that lives in the R root directory ans is executed at startup.
You could put library() commands in that.
See ?Startup for more information.
Regards
JS
---
John Seers
Institute of Food Research
Norwich
Is this what you want? :
gsub(cpue\|nogd, , string)
John
---
Web sites:
www.ifr.ac.uk
www.foodandhealthnetwork.com
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luis Ridao Cruz
Sent: 15 November 2006 13:29
To: r-help@stat.math.ethz.ch
Hello All
I cannot close R easily:
q()
Error in .Last() : could not find function finalizeSession
This seems to have started after I used the R.utils package. If I load
the R.utils package I can close R successfully. But I do not want to
have to do this every time I run R.
Is there
:
www.ifr.ac.uk
www.foodandhealthnetwork.com
-Original Message-
From: Gavin Simpson [mailto:[EMAIL PROTECTED]
Sent: 09 November 2006 12:46
To: john seers (IFR)
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Closing R fails
On Thu, 2006-11-09 at 12:18 +, john seers (IFR) wrote:
Hello All
Hi
If the file is tab delimited you could try something like this:
a-read.delim(file, skip = 9, header=F, na.strings=NA)
Are you sure you want to skip 10 lines? (Is there a blank line
somewhere?)
J
---
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Hi Arne
If you are reading in from files and they are just one number per line
it would be more efficient to use scan directly. ?scan
For example:
filen-C:/temp/tt.txt
i-scan(filen)
Read 5 items
i
[1] 12345 5643765674 63566565666
-Original Message-
From: [EMAIL
Hi R guru coders
I wrote a bit of code to add a new column onto a topTable dataframe.
That is a list of genes processed using the limma package. I used a for
loop but I kept feeling there was a better way using a more vector
oriented approach. I looked at several commands such as apply, by
etc
]
e-disclaimer at http://www.ifr.ac.uk/edisclaimer/
Web sites:
www.ifr.ac.uk
www.foodandhealthnetwork.com
-Original Message-
From: Jacques VESLOT [mailto:[EMAIL PROTECTED]
Sent: 26 September 2006 14:02
To: john seers (IFR)
Cc: R-help
Subject: Re: [R] Vectorise a for loop?
tt
Perhaps here?
http://www.bioconductor.org/packages/bioc/1.6/src/contrib/html/plgem.htm
l
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Amir Safari
Sent: 04 September 2006 14:44
To: R-help@stat.math.ethz.ch
Subject: [R] library(plgem)
There is the Rserve package which you can look at here:
http://stats.math.uni-augsburg.de/Rserve/down.shtml
JS
---
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Albert
Is this what you want?:
a[,order(colSums(a))]
John S
---
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Albert Vilella
Sent: 21 June 2006 11:38
To: r help
Subject: [R] sort matrix by sum of columns
Hi all,
I would like to know how can
Hello All
I am having a bit of trouble formatting my HTML with the desired number
of digits after the decimal place. Am I doing something
wrong/misunderstanding or is it a bug?
Looking at the example supplied with ?HTML.data.frame:
HTML(iris[1:2,1:2],nsmall=c(3,1),file=)
Gives html
.
- Tom
john seers (IFR) wrote:
Hello All
I am having a bit of trouble formatting my HTML with the desired
number
of digits after the decimal place. Am I doing something
wrong/misunderstanding or is it a bug?
Looking at the example supplied with ?HTML.data.frame:
HTML(iris[1
]
e-disclaimer at http://www.ifr.ac.uk/edisclaimer/
Web sites:
www.ifr.ac.uk
www.foodandhealthnetwork.com
-Original Message-
From: Short, Tom [mailto:[EMAIL PROTECTED]
Sent: 09 June 2006 12:36
To: john seers (IFR); r-help@stat.math.ethz.ch
Subject: RE: [R] HTML nsmall vector
I think this does what you require.
#Read your data in whatever way you wish:
d1-data.frame(Date=c(2005/1/1,2005/2/1,2005/1/3,2005/1/4,2005/
1/7,2005/3/5),
x=c(119,123,-110,114,11,200),
y=c(230,-125,300,-21,299,311))
23 matches
Mail list logo