Re: [R] R newbie: logical subsets

2006-07-14 Thread Joshua Tokle
> [mailto:[EMAIL PROTECTED] On Behalf Of Gabor > Grothendieck > Sent: Tuesday, July 11, 2006 1:06 PM > To: Joshua Tokle > Cc: r-help@stat.math.ethz.ch > Subject: Re: [R] R newbie: logical subsets > > Try this, using the built in anscombe data set: > > anscombe[!rowSums(

Re: [R] R newbie: logical subsets

2006-07-12 Thread Greg Snow
ieck Sent: Tuesday, July 11, 2006 1:06 PM To: Joshua Tokle Cc: r-help@stat.math.ethz.ch Subject: Re: [R] R newbie: logical subsets Try this, using the built in anscombe data set: anscombe[!rowSums(abs(scale(anscombe)) > 2),] On 7/11/06, Joshua Tokle <[EMAIL PROTECTED]> wrote: > Hello!

Re: [R] R newbie: logical subsets

2006-07-11 Thread Gabor Grothendieck
Try this, using the built in anscombe data set: anscombe[!rowSums(abs(scale(anscombe)) > 2),] On 7/11/06, Joshua Tokle <[EMAIL PROTECTED]> wrote: > Hello! I'm a newcomer to R hoping to replace some convoluted database > code with an R script. Unfortunately, I haven't been able to figure out >

[R] R newbie: logical subsets

2006-07-11 Thread Joshua Tokle
Hello! I'm a newcomer to R hoping to replace some convoluted database code with an R script. Unfortunately, I haven't been able to figure out how to implement the following logic. Essentially, we have a database of transactions that are coded with a geographic locale and a type. These are be

Re: [R] R newbie

2006-07-10 Thread jim holtman
Does this do what you want: x <- "Exonstart end 5'UTR 2254006022540121 1 2254012222540140 2 2254030322540493 3 2254155222541565 4 2254237322542519 5 2254426522544432 3'UTR 2254443322544856" y

[R] R newbie

2006-07-10 Thread kannaiah
Hello, I am new to R and still feeling my way thru it. I am trying to plot the values from this file below on the X-axis of a plot. I have attached the graph to the email...the one i am trying to recreate. Exonstart end 5'UTR 2254006022540121 1 225401222254

Re: [R] R newbie attempting to plot data

2006-05-26 Thread Chuck Cleland
Rex Eastbourne wrote: > Hi, > > I just started using R and am having trouble with the below error: > > I type: > >> df <- read.csv("/home/rex/Desktop/mytable.csv") > > which gives me what I want: > > ... > 639 2006-05-26 16:46:54 4 16 > 640 2006-05-26 17:05:36 5 17 > 641 2006-05-26

[R] R newbie attempting to plot data

2006-05-26 Thread Rex Eastbourne
Hi, I just started using R and am having trouble with the below error: I type: > df <- read.csv("/home/rex/Desktop/mytable.csv") which gives me what I want: ... 639 2006-05-26 16:46:54 4 16 640 2006-05-26 17:05:36 5 17 641 2006-05-26 17:30:48 6 17 But now I try: > plot(df[4

Re: [R] R-newbie-question, fixed effects panel model, large number of observations

2006-02-11 Thread ronggui
This is one function I wrote. http://sociology.yculblog.com/post.794856.html 2006/2/12, Thomas Wilde <[EMAIL PROTECTED]>: > Hi, > > I'm trying to fit a fixed effect (LSDV) panelmodel with R. I have a dataset > with y as dependent, x1&x2 as indeps, t as time index and i as an > id-variable for ea

[R] R-newbie-question, fixed effects panel model, large number of observations

2006-02-11 Thread Thomas Wilde
Hi, I'm trying to fit a fixed effect (LSDV) panelmodel with R. I have a dataset with y as dependent, x1&x2 as indeps, t as time index and i as an id-variable for each individual. There are three observations for each individual (t=1, t=2, t=3). I want to try a simple regression, but with individu

Re: [R] R newbie example code question

2006-01-14 Thread Adrian DUSA
On Friday 13 January 2006 17:45, Ted Harding wrote: > On 13-Jan-06 Michael Friendly wrote: > > Ted: > > > > Your .xthelp is extremely useful, help on Linux being otherwise > > quite awkward to use since a pager in the same window make it hard > > to cut/paste examples --- where 'more' or 'less' rea

Re: [R] R newbie example code question

2006-01-14 Thread Adrian DUSA
nessie.mcc.ac.uk> writes: > [...] > The solution I finally opted for, and still use, > is based (in a Linux environment) on including > the following code in your .Rprofile file: > > .xthelp <- function() { > tdir <- tempdir() > pgr <- paste(tdir, "/pgr", sep="") > con <- file(pgr, "

Re: [R] R newbie example code question

2006-01-13 Thread Ted Harding
On 13-Jan-06 Michael Friendly wrote: > Ted: > > Your .xthelp is extremely useful, help on Linux being otherwise > quite awkward to use since a pager in the same window make it hard > to cut/paste examples --- where 'more' or 'less' really means > 'instead of' :-) Glad you found it useful. I find

Re: [R] R newbie example code question

2006-01-13 Thread Michael Friendly
Ted: Your .xthelp is extremely useful, help on Linux being otherwise quite awkward to use since a pager in the same window make it hard to cut/paste examples --- where 'more' or 'less' really means 'instead of' :-) Suggestion: include -title cat("cat > $HLPFIL\nxterm -title 'R-help' -e les

Re: [R] R newbie example code question

2006-01-10 Thread Gabor Grothendieck
You can also get access to the code chunks in vignettes as shown here: http://tolstoy.newcastle.edu.au/~rking/R/help/05/12/17822.html On 1/9/06, Uwe Ligges <[EMAIL PROTECTED]> wrote: > Mark Leeds wrote: > > > Sometimes I print out a package > > and read about it and there > > are sometimes nic

Re: [R] R newbie example code question

2006-01-10 Thread Martin Maechler
e from the examples when *editing* the *.Rd (R help) files ...) Martin Maechler, ETH Zurich > -Original Message- > From: Mark Leeds [mailto:[EMAIL PROTECTED] > Sent: Monday, January 09, 2006 1:20 PM > To: R-Stat Help > Subject: [R] R newbie example c

Re: [R] R newbie example code question

2006-01-10 Thread McGehee, Robert
ROTECTED] Sent: Monday, January 09, 2006 1:20 PM To: R-Stat Help Subject: [R] R newbie example code question Sometimes I print out a package and read about it and there are sometimes nice examples that I would like to run myself. Is there a way to bring them into R from the package or are they on

Re: [R] R newbie example code question

2006-01-10 Thread Ted Harding
On 09-Jan-06 Mark Leeds wrote: > Sometimes I print out a package > and read about it and there > are sometimes nice examples > that I would like to run myself. > > Is there a way to bring them > into R from the package or > are they only meant to be typed > in manually ? If manual is the > only w

Re: [R] R newbie example code question

2006-01-10 Thread Ted Harding
On 10-Jan-06 Ted Harding wrote: > > On 09-Jan-06 Mark Leeds wrote: >> Sometimes I print out a package >> and read about it and there >> are sometimes nice examples >> that I would like to run myself. >> >> Is there a way to bring them >> into R from the package or >> are they only meant to be ty

Re: [R] R newbie example code question

2006-01-10 Thread Ted Harding
On 09-Jan-06 Mark Leeds wrote: > Sometimes I print out a package > and read about it and there > are sometimes nice examples > that I would like to run myself. > > Is there a way to bring them > into R from the package or > are they only meant to be typed > in manually ? If manual is the > only

Re: [R] R newbie example code question

2006-01-09 Thread John Sorkin
Mark, I am not user where you find your reading material, but if it is online, perhaps you can copy and paste it into an R session. John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC

Re: [R] R newbie example code question

2006-01-09 Thread Mark Leeds
: [R] R newbie example code question Mark Leeds wrote: > Sometimes I print out a package > and read about it and there > are sometimes nice examples > that I would like to run myself. > > Is there a way to bring them > into R from the package or > are they only meant t

Re: [R] R newbie example code question

2006-01-09 Thread Uwe Ligges
Mark Leeds wrote: > Sometimes I print out a package > and read about it and there > are sometimes nice examples > that I would like to run myself. > > Is there a way to bring them > into R from the package or > are they only meant to be typed > in manually ? If manual is the > only way, that's f

[R] R newbie example code question

2006-01-09 Thread Mark Leeds
Sometimes I print out a package and read about it and there are sometimes nice examples that I would like to run myself. Is there a way to bring them into R from the package or are they only meant to be typed in manually ? If manual is the only way, that's fine. I was just checking whether there

Re: [R] R newbie configuration

2006-01-04 Thread Petr Pikal
"Mark Leeds" <[EMAIL PROTECTED]> To: "R-Stat Help" Subject:[R] R newbie configuration > I think I did enough reading on my > Own about startup ( part of the morning > And most of this afternoon ) > to not feel uncomfortable

[R] R newbie configuration

2006-01-04 Thread Mark Leeds
I think I did enough reading on my Own about startup ( part of the morning And most of this afternoon ) to not feel uncomfortable asking for confirmation of my understanding of this startup stuff. Obviously, the startup process is more complicated Than below but, for my R newbie purposes, It seem

Re: [R] R newbie...

2005-12-07 Thread David Hajage
Thank you for all your answers... I solved my problem thanks to you all ! david 2005/12/6, paul sorenson <[EMAIL PROTECTED]>: > > Return something that can hold more than one value, eg: > > calculate <- function(x, y) { >list(a=x+y, b=x-y) > } > > David Hajage wrote: > > Thank you for y

Re: [R] R newbie...

2005-12-06 Thread paul sorenson
Return something that can hold more than one value, eg: calculate <- function(x, y) { list(a=x+y, b=x-y) } David Hajage wrote: > Thank you for your answer. > > And what if my first function gives 2 results : > > calculate <- function(x,y) > { > a <- x + y > b <- x - y > } > >

Re: [R] R newbie...

2005-12-06 Thread Ted Harding
On 06-Dec-05 David Hajage wrote: > Hello, > > I'm a new user... > > I have a function : > > calculate <- function(x,y) > { > z <- x + y > } > I would like to use the result (z) with another function : > > recalculate <- function(...) > { > a <- z^2 > } > > But R says that z d

Re: [R] R newbie...

2005-12-06 Thread Uwe Ligges
David Hajage wrote: > Hello, > > I'm a new user... > > I have a function : > > calculate <- function(x,y) > { > z <- x + y # insert: z > } > I would like to use the result (z) with another function : > > recalculate <- function(...) > { > a <- z^2 # insert: a > } Ty

Re: [R] R newbie...

2005-12-06 Thread Sarah Goslee
calculate <- function(x,y) { a <- x + yb <- x - y list(a=a, b=b) } myresult <- calculate(x, y) myresult$a myresult$b Please at least read the "Introduction to R" at http://www.r-project.org/ It covers all of this very basic material. Sarah > -- Sarah Goslee http://www.stringpage

Re: [R] R newbie...

2005-12-06 Thread Kristel Joossens
Her you just make the functions. R> calculate <- function(x,y){z <- x + y} R> recalculate <- function(z){a <- z^2} You should run the functions, by take z as output for the first function ans z as input for the next function: R> calculate <- function(x,y){z <- x + y} R> recalculate <- function(z)

Re: [R] R newbie...

2005-12-06 Thread David Hajage
Thank you for your answer. And what if my first function gives 2 results : calculate <- function(x,y) { a <- x + y b <- x - y } How can I use both a and b in a new function ? 2005/12/6, Sarah Goslee <[EMAIL PROTECTED]>: > > First of all, you might try reading the manual. > > Second,

Re: [R] R newbie...

2005-12-06 Thread Sarah Goslee
First of all, you might try reading the manual. Second, you might try something like this: calculate <- function(x,y) { z <- x + yz } recalculate(z) { a <- z^2 a } z <- calculate(x, y) recalculate(z) You need to return some value from your functions, and you need to assign that v

[R] R newbie...

2005-12-06 Thread David Hajage
Hello, I'm a new user... I have a function : calculate <- function(x,y) { z <- x + y } I would like to use the result (z) with another function : recalculate <- function(...) { a <- z^2 } But R says that z does not exist... How can I use z in an another function ? Thank you

[R] R newbie question

2004-03-04 Thread Michael
Hi all I have just started using R (1.8.1) on Mac OS X & am very excited about the potential of such a flexible system with such good graphics potential & so many useful packages available. Congratulations to all the developers & I hope to be contributing some packages myself in the near future,