[R] read.table : how to condition on error while opening file?

2009-02-19 Thread Stephane Bourgeois
Hi, I'm using read.table in a loop, to read in multiple files. The problem is that when a file is missing there is an error message and the loop is broken; what I'd like to do is to test for the error and simply do "next" instead of breaking the loop. Anybody knows how to do that? Example:

[R] Font size in plots (I do NOT understand par help)

2008-08-06 Thread Stephane Bourgeois
Hi, I do not get how par works, help please. Let's say I have a simple plot: plot(1:10) I want to change the font size for the x axis... how do I do that? Thank you, Stephane -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity regist

[R] attributing values to dataframe positions following eval

2008-07-08 Thread Stephane Bourgeois
Hi everybody, I've been looking around, but can't seem to find the answer. I get a list of names (which vary, so I never know them in advance), and transform them into variables, each of which is a dataframe, using assign: polyList <- c("rs123", "rs124", "rs555", "rs000") numPoly <- le

[R] How to get an argument dynamically from a list?

2008-06-29 Thread Stephane Bourgeois
Hi, I'd like to get an argument (I think it's the right term) dynamically from a list, but cannot manage to do it. Here is the code I use: #output given by database BOB <- c('A/A', 'C/C', '15/27') MARY <- c('A/A', NA, '13/12') JOHN <- c('A/A', 'C/A', '154/35') CLIFF <- c('A/C', 'C/C', '15/12')

[R] creating a dataframe using a list of the variable names

2008-06-28 Thread Stephane Bourgeois
Hello, I'm fairly new to R, and despite spending quite some time exploring, testing, and looking for answers, I still have a couple of questions remaining... The first one is about creating a dataframe using a list of the variable names . I get this output file from a database: BOB <- c('A/A',