Re: [R] A question about data frame

2011-03-10 Thread Rob Tirrell
See the max.levels argument in ?print. I think this is what you're looking for. -- Robert Tirrell | r...@stanford.edu | (607) 437-6532 Program in Biomedical Informatics | Butte Lab | Stanford University On Thu, Mar 10, 2011 at 13:35, Gang Chen wrote: > n = c(2, 3, 5) > > s = c("aa", "bb", "cc"

Re: [R] SQLDF - Submitting Queries with R Objects as Columns

2011-03-09 Thread Rob Tirrell
You're submitting queries for SQLDF to execute as strings. So, if you want to use a variable column name, sprintf() or paste() your statement together, like: sqldf(sprintf('select sum(%s) as XSUM, Y as Y from testdf group by Y', var1)) -- Robert Tirrell | r...@stanford.edu | (607) 437-6532 Progra

Re: [R] Incorrectness of mean()

2011-02-28 Thread Rob Tirrell
Keep your eyes out for this - you will find this sort of behavior throughout R. -- Robert Tirrell | r...@stanford.edu | (607) 437-6532 Program in Biomedical Informatics | Butte Lab | Stanford University On Mon, Feb 28, 2011 at 02:26, zbynek.jano...@gmail.com < zbynek.jano...@centrum.cz> wrote:

[R] Database abstraction

2011-02-27 Thread Rob Tirrell
Hi all - I've been working on a lite ORM and database abstraction package for R. Formatting complex queries by hand has always been an error-prone hassle, so I've tried to do away with that as much as possible, instead, using R objects to represent elements of a database system (statements, clause

Re: [R] Hello!

2011-02-27 Thread Rob Tirrell
Look at ?readline for input from the user. For reading Excel files, a good place to start would be page 26 of the manual: http://cran.r-project.org/doc/manuals/R-data.pdf -- Robert Tirrell | r...@stanford.edu | (607) 437-6532 Program in Biomedical Informatics | Butte Lab | Stanford University O

Re: [R] Selecting data based on the range of dates

2011-02-25 Thread Rob Tirrell
Try my.date <- strptime("20/2/06 11:16:16.683", "%d/%m/%y %H:%M:%OS") Then you can examine my.date$mon. -- Robert Tirrell | r...@stanford.edu | (607) 437-6532 Program in Biomedical Informatics | Butte Lab | Stanford University On Thu, Feb 24, 2011 at 14:12, Belle wrote: > > I think I got it,

Re: [R] Compatibility with R for Windows 2.12.2

2011-02-25 Thread Rob Tirrell
I can't think of a reason why they would... Rob Tirrell On Thu, Feb 24, 2011 at 23:56, Vedajit Boyd wrote: > Hi, > > Please someone let me know that the installation of both R for Windows > 2.12.2 and MS office 2010 on the same system will interfere each other or > not. &

Re: [R] output selectively change the font

2011-02-21 Thread Rob Tirrell
If I understand you correctly - you can add a column to the output table for your color variable?. Otherwise, if you need to write the *text* in a different color, that's probably something you want to do outside of R... Rob Tirrell On Mon, Feb 21, 2011 at 10:14, Yan Jiao wrote: &

Re: [R] Finding length of unique numbers in a vector

2011-02-10 Thread Rob Tirrell
How about: table(samp) -- Robert Tirrell | r...@stanford.edu | (607) 437-6532 Program in Biomedical Informatics | Butte Lab | Stanford University On Thu, Feb 10, 2011 at 13:54, Nipesh Bajaj wrote: > > set.seed(100) > > samp <- sample(c(1,-1,0), 20, replace=T); samp > [[alternative H

[R] Multiple inheritance with reference classes?

2011-02-09 Thread Rob Tirrell
ClassS *<-* setRefClass*(*'ClassS', fields = c*(* 'field.s' *)*, methods = list*(* initialize = *function**()* *{* *return**(*initFields*(*field.s = 0*))* *}* *)* *)* ClassM *<-* setRefClass*(*'ClassM', fields = c*(* 'field.m' *)*, methods = list*(* initialize = *function**()*