Re: [R] Changing the position of the origin

2008-11-17 Thread Thomas Petzoldt
Plantky wrote: Hi all, Can anyone tell me how I can make 0,0 start at the top left hand corner of a graph, instead of the typical lower left hand corner? I've tried to plot with axes=F and then putting on the axes later, but I want the points to correspond to the axes. Thanks, Kang Min Does t

Re: [R] counting the number of elements in a column

2008-11-17 Thread David Winsemius
On Nov 18, 2008, at 12:50 AM, kayj wrote: Hi All, I have a column that contains values between 0 and 1. I would like to make a table that consists of the number of elements in each category. For example , how many elements have values between 0 and 0.1, 0.1 to 0.2, 0.2 to 0.3,etc……..0

Re: [R] re ading specific columns

2008-11-17 Thread David Winsemius
On Nov 18, 2008, at 12:57 AM, kayj wrote: I have a huge txt file and I only want to get out of it column 3 and 7. I tried to read the whole file and then extract the two columns, but I ran into a memory problem since the file is huge. Is it possible just to tell R to read these two col

Re: [R] Changing the position of the origin

2008-11-17 Thread Kang Min
Hi Daniel, I'm sorry I wasn't clear. All my values are positive, and I'm plotting the map of a rectangular plot. I have all the x and y values of individual points, but the 0,0 point is at the top left hand corner of the plot. I have no problems plotting it with the 0,0 at the lower left hand

[R] re ading specific columns

2008-11-17 Thread kayj
I have a huge txt file and I only want to get out of it column 3 and 7. I tried to read the whole file and then extract the two columns, but I ran into a memory problem since the file is huge. Is it possible just to tell R to read these two columns without reading the whole file? Thanks -

[R] sequencially merge multiple files in a folder

2008-11-17 Thread Ping-Hsun Hsieh
Dear all, If the question is too easy, please forgive me since I am only few weeks old in R. I have worked on this question a few days and still cannot figure it out. Here I have a folder with more than 50 tab-delimited files. Each file has a few hundreds of thousands rows/subjects, and th

[R] counting the number of elements in a column

2008-11-17 Thread kayj
Hi All, I have a column that contains values between 0 and 1. I would like to make a table that consists of the number of elements in each category. For example , how many elements have values between 0 and 0.1, 0.1 to 0.2, 0.2 to 0.3,etc……..0.9 to 1. Is there an easy way to do this? Thanks

[R] don't display rulers in image() command and script file input

2008-11-17 Thread Eleanor
Hi Ernesto, This is Eleanor from NOHS. Ikaw ni? Nadula ko ang e-mail address mo sang pag change ko sang provider. Pero indi ko sure kon ikaw ni. Kon indi, please ignore this e-mail. Regards, Eleanor [[alternative HTML version deleted]] __

Re: [R] how to calculate another vector based on the data from a combination of two factors

2008-11-17 Thread jeffc
Hi All, Thank all for the input. These different solutions rock!. Hao -- View this message in context: http://www.nabble.com/how-to-calculate-another-vector-based-on-the-data-from-a-combination-of-two-factors-tp20532749p20553226.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Changing the position of the origin

2008-11-17 Thread Daniel Malter
Hi, I don't understand the question. If your data is in the fourth quadrant (all positive Xs, all negative Ys) this will happen automatically as the standard R plot plots only in the range where there is data, e.g. x=rnorm(100,0,1) e=rnorm(100,0,1) y=-abs(x)-abs(e) plot(y~x,bty="n") Please be mor

Re: [R] Type III ANOVA of package car depends on factor level order

2008-11-17 Thread Xiaoxu LI
## Use model.matrix ## Data is the same ## continue m <- model.matrix(lm(rep(0,length(y)) ~ disease + drug +disease:drug)); ## Model.matrix(lm(y~...)) will drop is.na(y) rows. That result will be Type II rather than III ## for residuals of (disease:drug) will be orthogonal to disease and drug with

[R] Changing the position of the origin

2008-11-17 Thread Plantky
Hi all, Can anyone tell me how I can make 0,0 start at the top left hand corner of a graph, instead of the typical lower left hand corner? I've tried to plot with axes=F and then putting on the axes later, but I want the points to correspond to the axes. Thanks, Kang Min

Re: [R] # values used in a function in tapply

2008-11-17 Thread Stephanie Shaw
Thank you, that took care of it! Stephanie On Mon, Nov 17, 2008 at 12:33 PM, Jorge Ivan Velez <[EMAIL PROTECTED] > wrote: > > Dear Sephanie, > Try the following: > > # Data set including some NA values > set.seed(123) > X=cbind(c(3, 2, 2, 1, 2, 5, 5, 4, 1, 1),matrix(rnorm(100),ncol=10)) > colname

Re: [R] rgamma with rate as vector

2008-11-17 Thread Ben Bolker
wcyee gmail.com> writes: > [snip] > > How does the function rgamma work in the instance with the rate > specified as a vector of values? My understanding is that rgamma > returns m random values from the gamma distribution for a given shape, > rate. But I don't understand what the resultin

Re: [R] functional (?) programming in r

2008-11-17 Thread Thomas Lumley
On Mon, 17 Nov 2008, Stavros Macrakis wrote: Agreed. In fact, the man page for 'for' seems to explicitly specify that the iteration variable is not mutable: "The variable var... is read-only". However, the implementation doesn't seem to enforce this: for (i in 1:5) print(i<-i) # n

Re: [R] functional (?) programming in r

2008-11-17 Thread Stavros Macrakis
On Mon, Nov 17, 2008 at 7:33 PM, Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: >> The R Language Definition manual that comes with R has a section on promises. Certainly. > on promises yes, but the question was whether the behaviour discussed > before is obvious and int

Re: [R] functional (?) programming in r

2008-11-17 Thread Thomas Lumley
On Mon, 17 Nov 2008, jim holtman wrote: You can use the 'local' function to make sure you create a value of 'i' that is defined when the function is defined: funcs = lapply(1:5, function(i)local({i; function(){ i}})) You can use pretty much any other function, too funcs = lapply(1:5, functi

Re: [R] Levelplot + Mosaic Plot hybrid?

2008-11-17 Thread Felix Andrews
Hi Kitty, You can scale the grid cells of a levelplot using the 'shrink' argument; see ?panel.levelplot As for your mosaic question, are you using the 'mosaicplot' function in the graphics package, or 'mosaic' in the vcd package, or something else? I suggest you provide a minimal example if you w

[R] reshape question

2008-11-17 Thread Alexandre Swarowsky
Hi, It's probably a simple issue but I'm struggling with that. I'll use the example shown in the help page. head(Indometh) wide <- reshape(Indometh, v.names="conc", idvar="Subject", timevar="time", direction="wide") head(wide) reshape(wide, idvar="Subject", varying=list(2:12),

Re: [R] functional (?) programming in r

2008-11-17 Thread jim holtman
You can use the 'local' function to make sure you create a value of 'i' that is defined when the function is defined: > funcs = lapply(1:5, function(i)local({i; function(){ i}})) > funcs[[3]]() [1] 3 > funcs[[2]]() [1] 2 On Mon, Nov 17, 2008 at 4:28 PM, Wacek Kusnierczyk <[EMAIL PROTECTED]> wrot

[R] Problem with boot.sem

2008-11-17 Thread Sergio
Hi everybody, Since I upgrade R to the version 2.7.1 the function boot.sem in the package sem doesn't work. When I run the function and then call the summary for the result I obtain: > summary(BM2w) Error in lower[i] <- ci[low] : nothing to replace with I try to solve the problem searching in t

Re: [R] functional (?) programming in r

2008-11-17 Thread Wacek Kusnierczyk
Gabor Grothendieck wrote: > On Mon, Nov 17, 2008 at 5:42 PM, Wacek Kusnierczyk > <[EMAIL PROTECTED]> wrote: > >> i haven't seen any docs page that would explain such cases, so it's hard >> to judge for me. this might be an unforeseen side effect of the >> intended behaviour of the promise mecha

Re: [R] functional (?) programming in r

2008-11-17 Thread Gabor Grothendieck
On Mon, Nov 17, 2008 at 5:42 PM, Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > i haven't seen any docs page that would explain such cases, so it's hard > to judge for me. this might be an unforeseen side effect of the > intended behaviour of the promise mechanism. The R Language Definition manua

Re: [R] readPDF() -- unsure how to install xpdf to make this work?

2008-11-17 Thread Tony Breyal
Hi All, thank you so very much for your help, i have now got it working! I thought that i had replied already but i don't think it got through so this is a repost of it for anyone who does a search on this topic... After adding the directory to the path variable, i should have restarted my laptop.

Re: [R] The use of F for False and T for True

2008-11-17 Thread Simon Blomberg
Fair enough. But I find my interactive data analysis jobs quickly get big enough (data manipulation, a series of model fits, some customised output) for the analysis script to turn into something that looks like a program. Of course, YMMV. I also get annoyed at code that uses = for assignment outsi

Re: [R] Type III ANOVA of package car depends on factor level order

2008-11-17 Thread Xiaoxu LI
## I got it. IV(s) of interaction should be orthogonal to main effect IV(s). ## Type III ANOVA / Interaction alone x_interaction<-cbind( (drug==2)&(disease==2) ,(drug==3)&(disease==2) ,(drug==4)&(disease==2) ,(drug==2)&(disease==3) ,(drug==3)&(disease==3)

Re: [R] ggplot2: can one have separate ylim for each facet?

2008-11-17 Thread hadley wickham
On Mon, Nov 17, 2008 at 3:49 PM, Etches Jacob <[EMAIL PROTECTED]> wrote: > In lattice > > #toy data > library(ggplot2) > library(lattice) > x <- rnorm(100) > y <- rnorm(100) > k <- sample(c("Weak","Strong"),100,replace=T) > j <- sample(c("Tall","Short"),100,replace=T) > w <- data.frame(x,y,j,k) > >

Re: [R] Cannot quit R - fame package issue?

2008-11-17 Thread Henrik Bengtsson
To solve the immediate problem of quitting R, you could try to define a dummy of the missing function, e.g. validServerIsRunning <- function(...) FALSE; and then quit(). This does of course ignore any potential problems of not "finalizing" the 'fame' package correctly. Alternatively, since the

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread hadley wickham
On Mon, Nov 17, 2008 at 3:42 PM, steve <[EMAIL PROTECTED]> wrote: > Thank you. Here's my version, using melt instead of do.call(make.groups... > > library(reshape) > fgl2 = melt(fgl[,-10]) > fgl2$type = fgl$type > bwplot(value ~ type | variable, data = fgl2) Or even more succintly: fgl2 <- melt(f

Re: [R] functional (?) programming in r

2008-11-17 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > Wacek, > > I think when people say that R semantics are derived from Scheme, all > they mean is that R supports lexical closures. But R has other > features which are very un-Scheme-like, and when they interact with > lexical closures, you get behavior you don't find in o

Re: [R] functional (?) programming in r

2008-11-17 Thread Thomas Lumley
On Mon, 17 Nov 2008, Wacek Kusnierczyk wrote: the following is a trivialized version of some functional code i tried to use in r: (funcs = lapply(1:5, function(i) function() i)) # a list of no-parameter functions, each with its own closure environment, # each supposed to return the correspondin

Re: [R] functional (?) programming in r

2008-11-17 Thread Stavros Macrakis
Wacek, I think when people say that R semantics are derived from Scheme, all they mean is that R supports lexical closures. But R has other features which are very un-Scheme-like, and when they interact with lexical closures, you get behavior you don't find in other functional languages. R passe

Re: [R] Classes

2008-11-17 Thread Martin Maechler
> "N" == Nick <[EMAIL PROTECTED]> > on Sat, 15 Nov 2008 13:39:44 -0800 (PST) writes: N> Code: # svm is an S3 class, so: setOldClass("svm") N> # Create the super class model: setClass("model") N> # For svm from e1071 this works (well gives no error): N> setIs("svm", "

[R] Cannot quit R - fame package issue?

2008-11-17 Thread Dan Slayback
Hello list member: I've recently had a problem in that I'm unable to quit an R Session. I noticed this after the update to 2.8.0, but I believe I also noticed it on another machine, in the previous version. It occurs on both linux and Mac platforms. It only occurs when I start R in some parti

[R] ggplot2: can one have separate ylim for each facet?

2008-11-17 Thread Etches Jacob
In lattice #toy data library(ggplot2) library(lattice) x <- rnorm(100) y <- rnorm(100) k <- sample(c("Weak","Strong"),100,replace=T) j <- sample(c("Tall","Short"),100,replace=T) w <- data.frame(x,y,j,k) xyplot(y~x|j+k,scales=list(y=list(relation="free"))) will give you a scale in each subplot w

Re: [R] functional (?) programming in r

2008-11-17 Thread Wacek Kusnierczyk
so just to show how scheme would do that: (map (lambda (function) (function)) (map (lambda (index) (lambda () index)) '(1 2 3 4 5))) ;; *this* is the scheme semantics vQ xxx wrote: > I agree, something is wrong here, especially since the R community > likes to say that R semant

Re: [R] paste command with new line separator

2008-11-17 Thread Sunayan Acharya
Thanks a lot. That works. I had no clue that the '\n' was still active and I could use cat to see the result. On Mon, Nov 17, 2008 at 3:58 PM, Oliver Bandel <[EMAIL PROTECTED]>wrote: > slurpy gmail.com> writes: > > > > > > > Win xp sp2, R v2.7.1 > > Hi. If I have two numeric columns in a data

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread steve
Thank you. Here's my version, using melt instead of do.call(make.groups... library(reshape) fgl2 = melt(fgl[,-10]) fgl2$type = fgl$type bwplot(value ~ type | variable, data = fgl2) Steve Deepayan Sarkar wrote: On Mon, Nov 17, 2008 at 11:15 AM, Chuck Cleland <[EMAIL PROTECTED]> wrote: On 11

Re: [R] CITATION file with multiple citEntry(): no BibTeX produced by citation()

2008-11-17 Thread Achim Zeileis
On Mon, 17 Nov 2008, Michael Friendly wrote: [Using R 2.8.0 / Win XP / ] I just added a CITATION file to the heplots package--- appended below. From the document ion for ?CITATION, there can be *one or more* calls to citEntry() within the CITATION file, and each should produce an object of clas

[R] functional (?) programming in r

2008-11-17 Thread Wacek Kusnierczyk
the following is a trivialized version of some functional code i tried to use in r: (funcs = lapply(1:5, function(i) function() i)) # a list of no-parameter functions, each with its own closure environment, # each supposed to return the corresponding index when applied to no arguments sapply(func

[R] code for Heckman selection with panel data

2008-11-17 Thread Lindy Helfman
Hello, Does anyone know of R code that exists to correct for sample selection with panel data as in: J.M. Wooldridge (1995), “Selection Corrections for Panel Data Models Under Conditional Mean Independence Assumptions,” Journal of Econometrics 68, 115-132. Many thanks for your consideratio

Re: [R] paste command with new line separator

2008-11-17 Thread Oliver Bandel
slurpy gmail.com> writes: > > > Win xp sp2, R v2.7.1 > Hi. If I have two numeric columns in a data frame, I can use the paste > command to combine them into a new column separated by a comma. > c3=paste(c1,c2,sep=',') > gives: 1 1 -> "1,1" > Is there any way I can use a new line (\n) as a sepa

Re: [R] coerce data.frame with table-like data to a table for use with barchart.table

2008-11-17 Thread Jorge Ivan Velez
Dear Dr. Carbon, Perhaps (not lattice): barplot(t(foo),beside=TRUE,col=rainbow(6),ylim=c(0,max(foo)),names.arg=paste('Question',1:3), ylab='Your title here',xlab='Your title here') legend('topleft',colnames(foo),pch=15,col=rainbow(6),ncol=2,cex=1.1) HTH, Jorge On Mon, Nov 17, 2008 at 3:40 PM

Re: [R] paste command with new line separator

2008-11-17 Thread Jorge Ivan Velez
Dear slurpy, Perhaps: cat('', 1,'\n', 1,'\n') See ?cat for more information. HTH, Jorge On Mon, Nov 17, 2008 at 3:03 PM, slurpy <[EMAIL PROTECTED]> wrote: > > Win xp sp2, R v2.7.1 > Hi. If I have two numeric columns in a data frame, I can use the paste > command to combine them into a new c

[R] coerce data.frame with table-like data to a table for use with barchart.table

2008-11-17 Thread Dr Carbon
I have a data.frame containing survey data that is already organized like a table: > foo Excellent Very Good Good Fair Poor Very Poor Question 1 8 7300 0 Question 2 5 5710 0 Question 3 71010

Re: [R] looking for matches

2008-11-17 Thread Peter Alspach
Alina I suspect you want match (or %in%): ?match HTH Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Alina Sheyman > Sent: Tuesday, 18 November 2008 9:04 a.m. > To: r-help@r-project.org > Subject: [R] looking for matches >

Re: [R] # values used in a function in tapply

2008-11-17 Thread Jorge Ivan Velez
Dear Sephanie, Try the following: # Data set including some NA values set.seed(123) X=cbind(c(3, 2, 2, 1, 2, 5, 5, 4, 1, 1),matrix(rnorm(100),ncol=10)) colnames(X)=c('day',paste('X',1:10,sep="")) X[2,2]<-X[5,10]<-X[3,8]<-NA X # mean excluding NA values # in parenthesis are the number of observati

Re: [R] looking for matches

2008-11-17 Thread Stavros Macrakis
I'm not sure I understand what you're looking for in the result. What exactly do you mean by a "match"? What do you want in the third table besides the class names? Do you just want a list (not a data frame) of those class names which table A and table B have in common? Then how about intersect

[R] CITATION file with multiple citEntry(): no BibTeX produced by citation()

2008-11-17 Thread Michael Friendly
[Using R 2.8.0 / Win XP / ] I just added a CITATION file to the heplots package--- appended below. From the document ion for ?CITATION, there can be *one or more* calls to citEntry() within the CITATION file, and each should produce an object of class "citation". With just a single citEntry(), ci

[R] looking for matches

2008-11-17 Thread Alina Sheyman
My question is probably pretty basic, but since I'm really new to R, here it goes I have two separate data frames that include class names and various other information on classes. I'm trying to create a match based on class names and if a match exists to create a third data frame with the c

Re: [R] Superimposing y-variables in Lattice formulas

2008-11-17 Thread Deepayan Sarkar
On Sun, Nov 16, 2008 at 7:27 PM, Stavros Macrakis <[EMAIL PROTECTED]> wrote: > Thank you for the pointer to your paper "Getting Started with Lattice > Graphics" -- it looks very useful. > > I think we're talking past each other on the question of the semantics > of formula operators, and it's proba

[R] paste command with new line separator

2008-11-17 Thread slurpy
Win xp sp2, R v2.7.1 Hi. If I have two numeric columns in a data frame, I can use the paste command to combine them into a new column separated by a comma. c3=paste(c1,c2,sep=',') gives: 1 1 -> "1,1" Is there any way I can use a new line (\n) as a separator? i.e. 1 1 -> 1 1 I tried paste

Re: [R] # values used in a function in tapply

2008-11-17 Thread Stephanie Shaw
Thank you very much for the suggestions, however I do not think they will help. Please let me know if I misunderstand. 1) Just using "colSums" without the "(!is.na)" portion provides: Error in FUN(X[[1L]], ...) : 'x' must be an array of at least two dimensions 2) In that context, sum appears

Re: [R] delete categories

2008-11-17 Thread Mark Difford
Hi Ann, >> Specifically it is for a MNL ... >> How are you definng "response" and "predictor"? You really are still leaving me, and I imagine other people on the list who read your email, largely in the dark. (But since you don't seem to be prepared to address anyone, or even the list, I don't s

Re: [R] using an image as a dendrogram label

2008-11-17 Thread Greg Snow
The help page for the subplot function in the TeachingDemos package shows an example of adding an image to an existing plot. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > -Original Message- > From: [EMAIL PROTECTED] [

Re: [R] please remove me from the mailing list. Thanks!

2008-11-17 Thread Gavin Simpson
Hi Susan, This is one of the things you are required to do yourself. Head over to: http://stat.ethz.ch/mailman/listinfo/r-help and look towards the bottom of the page for unsubscribe options. If that doesn't work for you then contact the list admins, email addresses for them are located towards

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread Deepayan Sarkar
On Mon, Nov 17, 2008 at 11:15 AM, Chuck Cleland <[EMAIL PROTECTED]> wrote: > On 11/17/2008 1:50 PM, steve wrote: >> Using the data set fgl in MASS the following code >> >> layout(matrix(1:9,3,3)) >> for(i in 1:9){ >> boxplot(fgl[,i] ~ type, data = fgl,main=dimnames(fgl)[[2]][i])} >> >> produces a 3

Re: [R] (no subject)

2008-11-17 Thread Greg Snow
This gives a data frame rather than a matrix, but you can convert it: x <- do.call( expand.grid, rep( list( c(-1,1) ), 20 ) ) hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > -Original Message- > From: [E

[R] Type III ANOVA of package car depends on factor level order

2008-11-17 Thread Xiaoxu LI
## Question1: How to define IV with interaction alone, without main effects? ## Question2: Should Type III ANOVA in package car be independent of the factor level order? ## data from http://www.otago.ac.nz/sas/stat/chap30/sect52.htm drug <- c(t(t(rep(1,3)))%*%t(1:4)); disease <- c(t(t(1:3)) %*% t

[R] using an image as a dendrogram label

2008-11-17 Thread Rajarshi Guha
Hi, does anybody know if it is possible to use an image (rather than text) to label the leaves of a dendrogram? I realize that this will not always lead to a useful on-screen display, but ideally I'd like to directly go from the dendrogram to a PDF and on-screen viewing is not to too import

Re: [R] The use of F for False and T for True

2008-11-17 Thread Gabor Grothendieck
How about !!0 # FALSE !!1 # TRUE Although its one more char, its very easy to press ! twice and when you look at it its more obvious since 0 is associated with FALSE and 1 with TRUE. On Mon, Nov 17, 2008 at 12:42 PM, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > To save my fingers and still bein

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread Chuck Cleland
On 11/17/2008 1:50 PM, steve wrote: > Using the data set fgl in MASS the following code > > layout(matrix(1:9,3,3)) > for(i in 1:9){ > boxplot(fgl[,i] ~ type, data = fgl,main=dimnames(fgl)[[2]][i])} > > produces a 3 by 3 array of plots, each one of which consists of six > boxplots. > > Is it pos

[R] integration

2008-11-17 Thread Derya Çalýþkan
Hello; I have a function with 3 variables. I would like to take integration with respect to just one variable. How can I write this function? You can find my function above. ( I am trying to find \int_ZL^ZU rho.bisquare(rho*z+u*sqrt(1-rho^2)*dnorm(u)du.Integrand has three variables, I know the

[R] (no subject)

2008-11-17 Thread Salas, Andria Kay
I need help generating all possible combination of a vector of randomly assigned values of 1 and -1. For example, a vector of 20 randomly placed 1s and -1s, and all possibilities (which would amount to 2^20 total vectors). I am able to generate one such vector (via sample(c(-1,1),20,replace=TR

Re: [R] Rcmd install problem: "cannot open the connection" and "No such file or directory"

2008-11-17 Thread CE.KA
Hi Søren, http://jekyll.math.byuh.edu/other/howto/R/Rcmdr.shtml Søren Højsgaard wrote: > > Dear all, > > On Windows XP with R 2.8.0, I get the error message below when I try > install a package from the command line. > (Installing as a local zip-file from the menu in the GUI works fine.)

[R] An array of an array of boxplots in lattice

2008-11-17 Thread steve
Using the data set fgl in MASS the following code layout(matrix(1:9,3,3)) for(i in 1:9){ boxplot(fgl[,i] ~ type, data = fgl,main=dimnames(fgl)[[2]][i])} produces a 3 by 3 array of plots, each one of which consists of six boxplots. Is it possible to do this in lattice? Steve "R version 2.7.

[R] please remove me from the mailing list. Thanks!

2008-11-17 Thread Ofner, Susan
Susan Ofner Biostatistician II Division of Biostatistics Indiana University School of Medicine 410 West 10th St., Suite 3045 Indianapolis, IN 46202 (317) 278 - phone (317) 274 - 2678 FAX http://www.biostat.iupui.edu/ [[alternative HTML version deleted]] ___

Re: [R] delete categories

2008-11-17 Thread Ann Leis
Specifically it is for a MNL I just want to drop temporarily to run a test. I have tried upData (dataset, g=as.numeric (g) but then I am not sure how I could apply na.omit to omit the variable. How are you definng "response" and "predictor"? On Mon, Nov 17, 2008 at 3:42 AM, Mark Difford <[EMAIL

[R] Levelplot + Mosaic Plot hybrid?

2008-11-17 Thread Kitty Lee
Hi. I have built a levelplot with 3 variables, X, Y, and Z where X and Y are the two axes and Z represents the intensity (i.e. Z~X*Y). Now I want to adjust the size of the grid (like a mosaic plot) where the size of each grid is weighted by a variable, W. Just wonder how can I do that with lev

[R] using boost in R package

2008-11-17 Thread Vidhu Choudhary
Hi All, I am making a R package which is using a boost c++ library. Can some suggest how can I compile the dll in windows using boost. It makes a package but during installation in fails to link boost and give errors Any help will be useful Thanks Vidhu _

Re: [R] The use of F for False and T for True

2008-11-17 Thread Henrik Bengtsson
To save my fingers and still being on the safe side, I always do: > !0 [1] TRUE > !1 [1] FALSE ;) ...still hackable though. /Henrik On Mon, Nov 17, 2008 at 5:25 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 17/11/2008 8:03 AM, hadley wickham wrote: >> >> On Sun, Nov 16, 2008 at 7:41 PM, S

Re: [R] Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 + : must have one more break than colour

2008-11-17 Thread David Winsemius
On Nov 17, 2008, at 12:30 PM, David Winsemius wrote: On Nov 17, 2008, at 11:01 AM, paul murima wrote: heatmap.2(m, margins= c(9,9), col = bluered(64), trace=c("none"), breaks=c(seq(-60,0,60/20)), symkey=TRUE, density.info="histogram", cexRow=1,) Error in image.default(1:nc, 1:nr, x, xlim = 0

Re: [R] Question on creating list object

2008-11-17 Thread Stavros Macrakis
On Mon, Nov 17, 2008 at 5:00 AM, megh <[EMAIL PROTECTED]> wrote: >> lapply(1:5, function(i) c(1,2,3)^i) > [[1]] > [1] 1 2 3 ... > This is fine. However my goal is : each element of this list should depend > on previous element like : > > lis # List name > then, > > lis[[i]] = lis[[i-1]] + c(1,2,3)^

Re: [R] Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 + : must have one more break than colour

2008-11-17 Thread David Winsemius
On Nov 17, 2008, at 11:01 AM, paul murima wrote: heatmap.2(m, margins= c(9,9), col = bluered(64), trace=c("none"), breaks=c(seq(-60,0,60/20)), symkey=TRUE, density.info="histogram", cexRow=1,) Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 + : must have one more br

[R] R ORM?

2008-11-17 Thread Faheem Mitha
Hi, Does anyone know of an R ORM (Object Relational Mapper)? I'm thinking of something similar to sqlalchemy (http://www.sqlalchemy.org/). Alternatively or additionally, can people offer suggestions about managing relational databases from R. I'm currently using postgresql, but would like a

Re: [R] ggplot2: using more than 6 symbols

2008-11-17 Thread Dave Murray-Rust
On 17 Nov 2008, at 13:00, hadley wickham wrote: Hi Dave, On Mon, Nov 17, 2008 at 6:35 AM, Dave Murray-Rust <[EMAIL PROTECTED]> wrote: I'm trying to plot multiple lines using different colours/symbols to distinguish them. If I try to plot more than 6 lines, I get an error: ggplot( dat, aes(x

Re: [R] R cycle to calculate distances

2008-11-17 Thread Gavin Simpson
On Mon, 2008-11-17 at 07:20 -0800, P.Branco wrote: > Sorry, it does not work. > > If I do a rnorm I lose the original values of my vectors, and the equation > result must be attained by the use of the original values. Dimitris was generating some dummy data to test that the function worked. He ha

Re: [R] Command line arguments with source() - Windows OS

2008-11-17 Thread Gavin Simpson
On Mon, 2008-11-17 at 15:12 +0100, Wacek Kusnierczyk wrote: > Duncan Murdoch wrote: > > > > paramValue <- 15 > > source("myRfile.R") > > > > The quotes are necessary, because source(myRfile.R) would go looking > > for a variable named myRfile.R, rather than using "myRfile.R" as the > > filename. >

Re: [R] Time plots

2008-11-17 Thread Oliver Bandel
Lathouri, Maria imperial.ac.uk> writes: [...] > Until here it works fine, but I have the graph plotting only the points. What I want is to have a line (join > these points) so to have a time plot. I have tried different commands such as lines(DATE,pH) or with(DF, > lines(DATE,pH) but nothing work

Re: [R] Time plots

2008-11-17 Thread Gabor Grothendieck
Also if this is a time series you may wish to represent it as such to facilitate other computations as well. This assumes that the DATE column is first and the remaining columns are numeric: library(zoo) mypath <- "/whatever/myfile.csv" z <- read.zoo(mypath, sep = ",", header = TRUE, format = "%d

Re: [R] Portected? Variable assignment? Was RE: The use of F for False and T for True

2008-11-17 Thread Luke Tierney
Have a look at ?lockBinding Best, luke On Mon, 17 Nov 2008, Lucke, Joseph F wrote: The TRUE/FALSE vs. T/F issue brings up a related one. Can one assign a variable a value during an R session that cannot be re-assigned any new value during the session? That is, the variable is `protected' f

Re: [R] Time plots

2008-11-17 Thread Stefan Grosse
On Mon, 17 Nov 2008 15:30:14 - "Lathouri, Maria" <[EMAIL PROTECTED]> wrote: LM> I want to do some time plots and actually the dates are in the LM> format of dd/mm/. So first I input my dataframe in R in a csv LM> form. What I do is DF<-read.csv("C:/Documents and Settings/DF.csv") LM> DATE<

Re: [R] R cycle to calculate distances

2008-11-17 Thread Philipp Pagel
On Mon, Nov 17, 2008 at 07:20:22AM -0800, P.Branco wrote: > > Sorry, it does not work. > > If I do a rnorm I lose the original values of my vectors, and the equation > result must be attained by the use of the original values. He didn't want you to actually do the rnorm part - he just used that

[R] Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 + : must have one more break than colour

2008-11-17 Thread paul murima
heatmap.2(m, margins= c(9,9), col = bluered(64), trace=c("none"), breaks=c(seq(-60,0,60/20)), symkey=TRUE, density.info="histogram", cexRow=1,) Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 + : must have one more break than colour Hie all. I am working on scaling my d

Re: [R] Time plots

2008-11-17 Thread jim holtman
try plot(DATE, pH, type='l') On Mon, Nov 17, 2008 at 10:30 AM, Lathouri, Maria <[EMAIL PROTECTED]> wrote: > Dear all, > I want to do some time plots and actually the dates are in the format of > dd/mm/. So first I input my dataframe in R in a csv form. What I do is > > DF<-read.csv("C:/Docum

Re: [R] Gmane-interface

2008-11-17 Thread Oliver Bandel
Hello, I have written a mail to gmane so that they can correct their page (eventually throwing out that link). Btw, the framed version of the link to the gmane-page (from r-cran project pages) appears like being part of the r-cran-pages; that was the reason, why I thought the gmane-archive-serve

Re: [R] Epicalc package

2008-11-17 Thread Luciano La Sala
Dear David, Thank you very much for your help! I think I have solved the issue. Lucho --- On Fri, 11/14/08, David Winsemius <[EMAIL PROTECTED]> wrote: From: David Winsemius <[EMAIL PROTECTED]> Subject: Re: [R] Epicalc package To: "Luciano La Sala" <[EMAIL PROTECTED]> Cc: "r help" Date: Fri

Re: [R] Portected? Variable assignment? Was RE: The use of F for False and T for True

2008-11-17 Thread Martin Morgan
"Lucke, Joseph F" <[EMAIL PROTECTED]> writes: > > The TRUE/FALSE vs. T/F issue brings up a related one. Can one assign a > variable a value during an R session that cannot be re-assigned any new > value during the session? That is, the variable is `protected' from > change during the session.

Re: [R] HELP ON SCALING GENE EXPRESSION DATA TO -1,0,1

2008-11-17 Thread Martin Morgan
"paul murima" <[EMAIL PROTECTED]> writes: > Hello R-Community, > > I am a rookie in R and I am fascinated with the power of bio computing > by R. I am analysing gene expression data from Real time PCR. I have > used absolute gene quantitation to measure gene copy number in all my > transcripts. Al

[R] Time plots

2008-11-17 Thread Lathouri, Maria
Dear all, I want to do some time plots and actually the dates are in the format of dd/mm/. So first I input my dataframe in R in a csv form. What I do is DF<-read.csv("C:/Documents and Settings/DF.csv") DATE<-as.Date(DATE, "%d/%m/%Y") # to tell R that DATE column is indeed dates with(DF,

Re: [R] Calculate Specificity and Sensitivity for a given threshold value

2008-11-17 Thread Kaliss
Thanks to you both -- View this message in context: http://www.nabble.com/Calculate-Specificity-and-Sensitivity-for-a-given-threshold-value-tp20481633p20541110.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org maili

[R] How to solve this nonlinear regression problem?

2008-11-17 Thread tedzzx
Hi,all I am doing a nonlinear regression and I am going to use nls. To Minimize:sum{(Y-BS(s,x,r,t,v)) ^2} a<-nls(Y~BS(s,x,r,t,v)) BS is the black-scholes model. BS<-function(s,x,r,t,v){ d1=(ln(s/x)+v^2*t/2)/(v*t^(0.5)) d2=(ln(s/x)-v^2*t/2)/(v*t^(0.5)) c=e^(rt)*(s*N(d1)-x*N(d2)) } where s,x,

Re: [R] R cycle to calculate distances

2008-11-17 Thread P.Branco
Sorry, it does not work. If I do a rnorm I lose the original values of my vectors, and the equation result must be attained by the use of the original values. Thanks, P.Branco Dimitris Rizopoulos-4 wrote: > > try this (presented only for two pairs): > > r1 <- rnorm(49) > r2 <- rnorm(49) > s1

[R] Portected? Variable assignment? Was RE: The use of F for False and T for True

2008-11-17 Thread Lucke, Joseph F
The TRUE/FALSE vs. T/F issue brings up a related one. Can one assign a variable a value during an R session that cannot be re-assigned any new value during the session? That is, the variable is `protected' from change during the session. `Session' here is not precisely defined, so that will i

Re: [R] a bit off topic: data for dragsters?

2008-11-17 Thread Thompson, David (MNR)
Roland, I don't know of the specific data you are asking for but the official website of the 'National Hot Rod Assoc' (?) is www.nhra.com. DaveT. * Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natural Resources [EMAIL PROTECTE

Re: [R] igraph rglplot SVD-layout

2008-11-17 Thread Gábor Csárdi
Rainer, here is a quick workaround: layout.svd3 <- function (graph, d = shortest.paths(graph), ...) { if (!is.igraph(graph)) { stop("Not a graph object") } l <- svd(d, 3)$u l[, 1] <- l[, 1]/dist(range(l[, 1])) l[, 2] <- l[, 2]/dist(range(l[, 2])) l[, 3] <- l[, 3]/dist(range(l[, 3]

Re: [R] R cycle to calculate distances

2008-11-17 Thread Dimitris Rizopoulos
try this (presented only for two pairs): r1 <- rnorm(49) r2 <- rnorm(49) s1 <- rnorm(300) s2 <- rnorm(300) dd <- sqrt(0.723523 * outer(r1, s1, "-")^2 + 0.215518 * outer(r2, s2, "-")^2) dd I hope it helps. Best, Dimitris P.Branco wrote: Dear all, I am for the first time trying to work with

[R] R cycle to calculate distances

2008-11-17 Thread P.Branco
Dear all, I am for the first time trying to work with R, but I have bumped into a problem. I have four vectors: r1 (49 values) r21 (49 values) r22 (49 values) r3 (49 values) s1 (300 values) s21 (300 values) s22 (300 values) s3 (300 values) And I would like to calculate the distances from all re

Re: [R] Command line arguments with source() - Windows OS

2008-11-17 Thread Duncan Murdoch
On 17/11/2008 9:14 AM, Brigid Mooney wrote: Is there a better command to use rather than source which would take command arguments? I ask because I currently have 6 parameters, will likely have additional paramaters later, and would like to be able to have default values for each, if I do no

Re: [R] Command line arguments with source() - Windows OS

2008-11-17 Thread Brigid Mooney
Is there a better command to use rather than source which would take command arguments? I ask because I currently have 6 parameters, will likely have additional paramaters later, and would like to be able to have default values for each, if I do not specify new values. Thanks so much! On Mon, No

  1   2   >