Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Roger DeAngelis(xlr82sas) > Sent: Tuesday, April 06, 2010 6:35 PM > To: r-help@r-project.org > Subject: Re: [R] SAS and R on multiple operating systems > > > Thanks Dennis, > >

[R] specifying header in sqldf() and RSQLite

2010-04-06 Thread Andrew Yee
I have a file that I'm planning on manipulating with sqldf(). The header for this file is malformed, and I was wondering if there's a way to specify the values of the header ahead of time. I can see there are T/F options for header in sqldf(... list(header=T, ...), but was wondering if there's a

[R] Customizing ordination plots using symbols for factors

2010-04-06 Thread Sarah Berke
Hi, I could use a hand solving a fairly straightforward ordination plot problem: I am conducing NMDS on some community data for roughly 300 localities and 650 species. I have a community matrix, a species attribute matrix, and an environmental attributes matrix. After running metaMDS {vegan} on

Re: [R] Quartering a plot() ?

2010-04-06 Thread Kyle.
If it's specifically drawing the grid that's the trouble, I think the simplest approach is to use the grid() function in the base graphics package. Kyle H. Ambert Fellow, National Library of Medicine Department of Medical Informatics & Clinical Epidemiology Oregon Health & Science University On

Re: [R] Quartering a plot() ?

2010-04-06 Thread Daniel Malter
Hi, nothing customized is effortless. It typically requires a bit of coding unless you are lucky and somebody has implemented it in some package (you just have to find the package). But it's not that difficult to do it yourself. It just requires figuring out where the lines should be placed, which

Re: [R] svm of e1071 package

2010-04-06 Thread Shyamasree Saha [shs]
Dear Steve, Thanks again for your help and reply. your help was very useful and gave us some options. We will follow your suggestions and let you know about it. Regards, shyama From: Steve Lianoglou [mailinglist.honey...@gmail.com] Sent: Tuesday, April 06

Re: [R] library sets: A & EMPTY does not work; gset_intersection(A,EMPTY) works

2010-04-06 Thread David Meyer
This is rather by chance due to numeric instabilities, I think: > uv <- c('a', 'b', 'c'); s <- gset(uv, runif(length(uv))) > s {"a" [0.7533966], "b" [0.968067], "c" [0.2494876]} > s == s [1] TRUE > gset_is_equal(s,s) [1] TRUE But using all.equal instead of `==` for the memberships might by a goo

[R] exporting rotating plot into Powepoint

2010-04-06 Thread Zoppoli, Gabriele (NIH/NCI) [G]
Hi, I need to export a rotating plot like the one generated from the following function into a PPT slide or something that can be viewed by reviewers of a journal: library(np) library(datasets) data(faithful) f <- npudens(~eruptions+waiting,data=faithful) plot(f,view="rotate",neval=100

Re: [R] glmpath in R

2010-04-06 Thread Frank E Harrell Jr
Claire Wooton wrote: Steve Lianoglou gmail.com> writes: Hi Claire, I'm replying and CC-ing to the R-help list to get more eyes on your question since others will likely have more/better advice, and perhaps someone else in the future will have a similar question, and might find this thread han

[R] Quartering a plot() ?

2010-04-06 Thread Wells Oliver
Sorry if my terminology is all out of sorts here, but I'm curious about a simple matter: I have a plot, and within it a box defined by lines, like so: plot(c(), xlim=c(-1.5,1.5), ylim=c(0,5)) lines(c(1,1,-1,-1,1),c(1.5,3.5,3.5,1.5,1.5), col=c("red")) I'd like to easily chop the box drawn by lines

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Roger DeAngelis(xlr82sas)
Thanks Dennis, Thanks for taking the time that was a very informed response. It was a teachable moment for me. I didn't know about the breath and depth of LaTeX. I need to do some self education. Unfortunately I don't see how to integrate LaTeX with SAS, since SAS has its own template/ta

Re: [R] help output figures in R

2010-04-06 Thread Changbin Du
Thanks so much! On Tue, Apr 6, 2010 at 5:19 PM, Dennis Murphy wrote: > If you have a bunch of files in the same directory, look into list.files() > and consider > using lapply or some type of loop to process the files. There are examples > from > past questions in the archives. Use package sos o

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Gabor Grothendieck
Yes, indexing will typically make a large difference. On Tue, Apr 6, 2010 at 3:54 PM, Abhishek Pratap wrote: > Hi Guys > > I have two data frames which I would like to merge on two conditions. > > I am doing the following  (abstract form) > > new.data.frame <- merge(df1,df2, by=c("Col1","Col2"))

Re: [R] simultaneous plots

2010-04-06 Thread Yi Du
Hi Alex, You can try to use: par(new=TRUE) to draw the two graphs together. But keep in mind that the scale of x axis of both graphs is using the same level. Otherwise, the graph would be messed up. Yi On Tue, Apr 6, 2010 at 6:16 PM, Alexandre Serra Barreto wrote: > > Dear listmates, >

[R] simultaneous plots

2010-04-06 Thread Alexandre Serra Barreto
Dear listmates, could anybody help me on how to do simultaneous plots? for instance: plot(x,y) plot(x,z) but my intention is to plot both of them simultaneously in the same graphic. Thanks in advance, Alexandre. __ R-help@r-project.

Re: [R] Palette color order in bwplot (lattice violin plot) vs. boxplot

2010-04-06 Thread Felix Andrews
On 6 April 2010 20:14, Luigi Ponti wrote: > On 04/04/2010 06:21, Deepayan Sarkar wrote: >> On Thu, Apr 1, 2010 at 4:10 AM, Luigi Ponti wrote: >> >>> Hello, >>> >>> I am trying to give different colors to boxes in a violin plot obtained via >>> bwplot from lattice package using a color palette fro

Re: [R] read numeric values with thousands seperator from csv file

2010-04-06 Thread jim holtman
If 'just' is the object with the character strings, then your expression: as.numeric(gsub("\\$ ", "", ("just"))) was trying to substitute for the "$" in the string 'just' and then convert it to numeric and of course you get NA. This is probably want you wanted. (notice no quotes around 'just')

Re: [R] appending an R-object to a list

2010-04-06 Thread David.Epstein
Thanks. A nice simple answer and exactly what I want. David -- View this message in context: http://n4.nabble.com/appending-an-R-object-to-a-list-tp1753544p1753665.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org m

[R] 3-D response surface using wireframe()

2010-04-06 Thread array chip
I am working on plotting a response surface using wireframe(). The default style/orientation is z | | y | \ | \ | \ | \| \ | \ | \ | \|x 0 Now what I want the orientation of axes is:

Re: [R] lattice package: line end style

2010-04-06 Thread Peter Ehlers
What a dummy I am. It just occurred to me that you can set grid graphical parameters with par.settings. cloud(your stuff, par.settings = list(grid.pars = list(lineend = "butt"))) -Peter Ehlers On 2010-04-06 14:53, Peter Ehlers wrote: On 2010-04-06 7:28, Daniel Alcock wrote: First, apo

Re: [R] help with "macro" in R

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 6:29 PM, Changbin Du wrote: library(lattice) hisfunc<- function (vari) { histogram(~ vari|target, data=total, type="count", layout=c(1,3), labels=TRUE, main="Histograms by target", col="skyblue") } hisfunc(total$acid) HI, guys, I am using the hisfunc to get histograms fo

Re: [R] R loop help

2010-04-06 Thread casperyc
Hi there, That's exactly what I want. I have checked ?combn out, but I could get the following, suppose that I want ALL possible combinations of them, as this == apply( combn(paste('x', 1:4, sep =""), 2), 2, function(v) get(v[1])*get(v[2])

[R] help with "macro" in R

2010-04-06 Thread Changbin Du
library(lattice) hisfunc<- function (vari) { histogram(~ vari|target, data=total, type="count", layout=c(1,3), labels=TRUE, main="Histograms by target", col="skyblue") } hisfunc(total$acid) HI, guys, I am using the hisfunc to get histograms for different variables, for the title of the histogr

Re: [R] help output figures in R

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 6:00 PM, Changbin Du wrote: Perhaps: somfunc<- function (file) { fname <- deparse(substitute(file)) aa_som<-scale(file) final.som<-som(data=aa_som, rlen=1, grid=somgrid(5,4, "hexagonal")) pdf(file=paste("/home/cdu/changbin/", fname, ".pdf", sep="") #output g

Re: [R] Error bar

2010-04-06 Thread Jim Lemon
On 04/07/2010 03:49 AM, ogbos okike wrote: Hi there, Using the code below I generated the plot attached. The error bars at day = -3, 2 and 4 appear are larger. I was thinking if there is a way I could make all the error bars to be of the same size. I don't know if that makes sense. If not, then,

Re: [R] Odd results with %% and conserving memory

2010-04-06 Thread Thomas Lumley
On Tue, 6 Apr 2010, JustinNabble wrote: Likewise, identical( (4.1 * 100 ) %/% 1 , 409 ) returns TRUE on my computer, so the result is off by exactly 1, too larger to be explained by floating point error. The result of (4.1 * 100 ) %/% 1 is an integer, so if it doesn't agree exactly it has to

Re: [R] Odd results with %% and conserving memory

2010-04-06 Thread Steve Lianoglou
Hi, On Tue, Apr 6, 2010 at 5:26 PM, JustinNabble wrote: > > Thanks for the response. I read through the Inferno and there's a lot of > useful stuff in there. However I think you may have missed something. > > Having some experience with other languages, I know that floating point > numbers aren't

[R] help output figures in R

2010-04-06 Thread Changbin Du
somfunc<- function (file) { aa_som<-scale(file) final.som<-som(data=aa_som, rlen=1, grid=somgrid(5,4, "hexagonal")) pdf(file="/home/cdu/changbin/file.pdf") #output graphic file. plot(final.som, main="Unsupervised SOM") dev.off() } I have many different files, if I want output pdf file

Re: [R] Odd results with %% and conserving memory

2010-04-06 Thread Bert Gunter
Ummm... I think the "problem" is with _your_ inadequate understanding. Consider: identical( (4.1 * 100 ) %/% 1 , 409 ) > 4.1*100 < 410 [1] TRUE So, due to finite precision, 4.1*100 is slightly less than 410. Whence the largest integer 1 can be divided into it is 409. i.e. > (4.1*100) %/% 1 [1]

Re: [R] How to import data from teradata

2010-04-06 Thread Marc Schwartz
On Apr 6, 2010, at 4:26 PM, sumit gupta wrote: > Hello All, > > I am very new to the R and i want to know how to connect to the teradata in > R and import data from there. > Currently I am using SAS to import data and i use the following syntax to > connect to teradata. > > > *Proc Sql; > conne

Re: [R] Odd results with %% and conserving memory

2010-04-06 Thread JustinNabble
Thanks for the response. I read through the Inferno and there's a lot of useful stuff in there. However I think you may have missed something. Having some experience with other languages, I know that floating point numbers aren't represented exactly, the issue is that R is off by much more than w

Re: [R] appending an R-object to a list

2010-04-06 Thread Barry Rowlingson
On Tue, Apr 6, 2010 at 10:28 PM, David.Epstein wrote: > > How do I append an R-object to a list? > I want to start with an empty list, and append R-objects one by one. > Does this start with a command like > mylist <- NULL > ?? > > I have read a few answers on R-help to questions like this, but th

Re: [R] read numeric values with thousands seperator from csv file

2010-04-06 Thread cavalier33901
Thanks I tried it with your values and it works, but when I try it with my values, plugging in "just" (not sure if i'm doing it right): > as.numeric(gsub("\\$", "", ("just"))) This is what I get: [1] NA Warning message: NAs introduced by coercion Btw here are the values im wokring with u

Re: [R] Need Help with Manipulating Columns

2010-04-06 Thread cavalier33901
Nice, thanks A lot. I got it figured out -- View this message in context: http://n4.nabble.com/Need-Help-with-Manipulating-Columns-tp1753364p1753471.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list htt

[R] estimating the starting value within a ODE using nls and lsoda

2010-04-06 Thread Conti, David
All- I am interested in estimating a parameter that is the starting value for an ODE model. That is, in the typical combined fitting procedure using nls and lsoda (alternatively rk4), I first defined the ODE model: minmod <- function(t, y, parms) { G <- y[1] X <- y[2] with(a

[R] appending an R-object to a list

2010-04-06 Thread David.Epstein
How do I append an R-object to a list? I want to start with an empty list, and append R-objects one by one. Does this start with a command like mylist <- NULL ?? I have read a few answers on R-help to questions like this, but they all seem to be well off the point. Sometimes it's assumed that the

[R] How to import data from teradata

2010-04-06 Thread sumit gupta
Hello All, I am very new to the R and i want to know how to connect to the teradata in R and import data from there. Currently I am using SAS to import data and i use the following syntax to connect to teradata. *Proc Sql; connect to odbc (dsn=teradata username = '**' password = '***

Re: [R] checking bivariate normality

2010-04-06 Thread Bert Gunter
Below. -- Bert Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Liviu Andronic Sent: Tuesday, April 06, 2010 2:06 PM To: arindam fadikar Cc: r-help@r-project.org Subject: Re: [R] checkin

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
You got the error. It is different naming convention of chr. I should be able to fix that pretty easily. In case the problem persists, I will contact the list. Thanks! -Abhi On Tue, Apr 6, 2010 at 5:01 PM, David Winsemius wrote: > OK, not the SNP's. So look at the "chr"'s. I will bet that you g

Re: [R] checking bivariate normality

2010-04-06 Thread Liviu Andronic
On Tue, Apr 6, 2010 at 12:48 PM, arindam fadikar wrote: > x <- iris$Sepal.Length[1:50]/iris$Sepal.Width[1:50] > y <- iris$Petal.Length[1:50]/iris$Petal.Width[1:50] > > I want to check whether (x,y) follows a bivariate normal distribution or > not,  using density plot or scatter plot. Is it possibl

Re: [R] Merging data frames on two conditions

2010-04-06 Thread David Winsemius
OK, not the SNP's. So look at the "chr"'s. I will bet that you get 0 when you try : length(intersect(data_lane6_snps$chr, data_lane6_snps_rsid$chr)) ... since one is using a format of "chrNN" and the other is using just "NN". You need to get the chromosome naming convention straightened out

Re: [R] lattice package: line end style

2010-04-06 Thread Peter Ehlers
On 2010-04-06 7:28, Daniel Alcock wrote: First, apologies for no example data but I don't think it's needed in this case, Q: Can (and if so how ) the line end style be changed for 'cloud' plots? I've tried par(lend=2), trellis.par.set(add.line = list(lend=2)) and much googling but to no avail

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
Just so you know length(intersect(data_lane6_snps$SNP, data_lane6_snps_rsid$SNP)) 796120 I just need to include the chr condition now where I am stuck. -Abhi On Tue, Apr 6, 2010 at 4:51 PM, Abhishek Pratap wrote: > Hi David > > I can understand looking the SNP data values it can be felt that t

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
Hi David I can understand looking the SNP data values it can be felt that they are different values and hence no result in merge. However the columns still have ~700K SNPs common. What I am looking for is a merge where the SNP and Chr matches. If I match only the SNP column I get partially correct

Re: [R] Merging data frames on two conditions

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 4:03 PM, Abhishek Pratap wrote: Hi David Here it is. You can ignore the bio jargon if it sounds confusing. Sometimes it is essential to have domain details. The corresponding data type of column (SNP, chr) on which I am applying merge is same. merge(data_lane6_snps, d

Re: [R] svm of e1071 package

2010-04-06 Thread Steve Lianoglou
Hi Shyama, Don't forget to CC the r-help list in your discussions so that there are more eyes on this problem, and others might potentially benefit from discussion. Comments in line. On Tue, Apr 6, 2010 at 4:06 PM, Shyamasree Saha [shs] wrote: > Dear Steve, > > Thanks a lot for your reply. As y

Re: [R] Need Help with Manipulating Columns

2010-04-06 Thread Erik Iverson
Erik Iverson wrote: possible hint: as.numeric(gsub("\\$", "", c("$1.23", "$1.32"))) and convert to character first before as.numeric if they were factors to begin with... cavalier33901 wrote: I have uploaded the property data from Lee County Property Appraiser into R, but my problem

Re: [R] Need Help with Manipulating Columns

2010-04-06 Thread Duncan Murdoch
On 06/04/2010 3:40 PM, cavalier33901 wrote: I have uploaded the property data from Lee County Property Appraiser into R, but my problem is that I am unable manipulate and use many of the columns because they are classified as factors. I think this is because the values represent selling prices a

Re: [R] Need Help with Manipulating Columns

2010-04-06 Thread Erik Iverson
possible hint: as.numeric(gsub("\\$", "", c("$1.23", "$1.32"))) cavalier33901 wrote: I have uploaded the property data from Lee County Property Appraiser into R, but my problem is that I am unable manipulate and use many of the columns because they are classified as factors. I think this is be

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
And I should also add that if I merge only on one column it works fine but the result is not what I want. merge(data_lane6_snps, data_lane6_snps_rsid , by = c("SNP") : works as expected. Is the "chr" column being a factor creating probs here ? -A On Tue, Apr 6, 2010 at 4:03 PM, Abhishek Pratap

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
Hi David Here it is. You can ignore the bio jargon if it sounds confusing. The corresponding data type of column (SNP, chr) on which I am applying merge is same. merge(data_lane6_snps, data_lane6_snps_rsid , by = c("SNP,"chr")) str(data_lane6_snps) 'data.frame': 7724462 obs. of 10 variables:

Re: [R] Merging data frames on two conditions

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 3:54 PM, Abhishek Pratap wrote: Hi Guys I have two data frames which I would like to merge on two conditions. I am doing the following (abstract form) new.data.frame <- merge(df1,df2, by=c("Col1","Col2")) What does str(df1) ; str(df2) ... show? It is giving me a

[R] Need Help with Manipulating Columns

2010-04-06 Thread cavalier33901
I have uploaded the property data from Lee County Property Appraiser into R, but my problem is that I am unable manipulate and use many of the columns because they are classified as factors. I think this is because the values represent selling prices and therefore have $ in front of them. I trie

Re: [R] NMDS Ordination Graphics Problem

2010-04-06 Thread Michael Denslow
Hi Trey, On Mon, Apr 5, 2010 at 1:58 PM, Trey wrote: > > Dr. Stevens, > > Hi, my name is Trey Scott, and I'm a grad student of Brian McCarthy's.  He > referred me to you because of your expertise in handling complex R problems. > We were hoping you could help us solve a nagging problem that is pr

[R] Error bar

2010-04-06 Thread ogbos okike
Hi there, Using the code below I generated the plot attached. The error bars at day = -3, 2 and 4 appear are larger. I was thinking if there is a way I could make all the error bars to be of the same size. I don't know if that makes sense. If not, then, is there a way I can plot only these 3 larges

[R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
Hi Guys I have two data frames which I would like to merge on two conditions. I am doing the following (abstract form) new.data.frame <- merge(df1,df2, by=c("Col1","Col2")) It is giving me a null result. Basically I need to apply two conditions. I also tried sqldf but it is running forever.

Re: [R] Data manipulation problem

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 3:30 PM, David Winsemius wrote: On Apr 6, 2010, at 9:56 AM, moleps islon wrote: OK... next question.. Which is still a data manipulation problem so I believe the heading is still OK. ##So now I read my population data from excel. No, you read it from a text file and pro

Re: [R] Data manipulation problem

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 9:56 AM, moleps islon wrote: OK... next question.. Which is still a data manipulation problem so I believe the heading is still OK. ##So now I read my population data from excel. No, you read it from a text file and providing the first ten lines of that text file should

[R] Adding labels on maps (using sp, maptools, or something else suggested)

2010-04-06 Thread Misha Spisok
Hello, I would like to place region names (or abbreviations if space is too limited) on a map. I have tried the following, copying and adapting various examples I have seen but without success. The first example is self-contained, but the second one requires the .shp file, which can retrieved at

Re: [R] Scope and assignment: baffling

2010-04-06 Thread Jeff Brown
Thanks, Bill! That was deep, and took me a long time to work through, but I get it now. And Gabor -- r-proto is great! -- View this message in context: http://n4.nabble.com/Scope-and-assignment-baffling-tp1747582p1753321.html Sent from the R help mailing list archive at Nabble.com. __

[R] Need help on predictive modeling of count data

2010-04-06 Thread Sudeepa Bhattacharyya
Hi, I have a data set of a number of compounds and their C13 chemical shifts data. The classes of the compounds are either strong or weak. There are 100 feature variables which are different C13 bins. In each C13 bin the values are counts (number of times a chemical shift is present in that

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Roger DeAngelis(xlr82sas)
Hi, I agree with Barry, but there are some of us out there that are trying to change the image of big Pharma. R helps statisticians do real science. I have complained for about 10 years about EXCEL and WORD driving the delivery of inputs and outputs. Years ago, I did a short gig with contrac

[R] plot.png

2010-04-06 Thread ogbos . okike
I've shared a document with you: plot.png http://docs.google.com/leaf?id=0B_J5_yv8GrERYWRhZjU4NDItMmMyOS00ZGIxLWE2ZDUtMDFiYTY3MzliMzhk&hl=en&invite=CIa4nqkK It's not an attachment -- it's stored online at Google Docs. To open this document, just click the link above. Hi there, Using the code b

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Roger DeAngelis(xlr82sas)
Hi, Just a couple of notes to reply to others questions. 1. unx is a file handle that points to my UNIX SAS work directory(like an R workspace). This directory is not mounted under windows. most of the SAS objects, ie SAS datasets in the 64bit Unix directory are available to my windows SAS p

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Barry Rowlingson
On Tue, Apr 6, 2010 at 6:27 PM, Roger DeAngelis(xlr82sas) wrote: > > Hi, > >  First a quick note about FDA and Style Guides. > >  Frank is correct the FDA does not require strict formatting. I once worked > for small startup and they sent EXCEL sheets to the FDA. However big pharma > usually has v

Re: [R] c(), or cat(), or paste(), all cause unwanted reordering

2010-04-06 Thread Nikos Alexandris
On Tue, 2010-04-06 at 19:29 +0200, Nikos Alexandris wrote: > Jeff Brown wrote: > > > Wow, you guys are awesome. Thanks! > > Nikos Alexandris wrote: > > Thanks for the "cat()" question Jeff and to all guRus out there for the > > replies. This is something I was looking for the last hour. > > I ca

[R] plot.png

2010-04-06 Thread ogbos . okike
I've shared a document with you: plot.png http://docs.google.com/leaf?id=0B_J5_yv8GrERYWRhZjU4NDItMmMyOS00ZGIxLWE2ZDUtMDFiYTY3MzliMzhk&hl=en&invite=CI2a3aYC It's not an attachment -- it's stored online at Google Docs. To open this document, just click the link above. [[alternative HTM

Re: [R] library sets: A & EMPTY does not work; gset_intersection(A,EMPTY) works

2010-04-06 Thread Czerminski, Ryszard
Hi Peter, This looks like another one: "gset_is_equal(X,X)" and "X == X" evaluate to FALSE ? > uv <- c('a', 'b', 'c'); s <- gset(uv, runif(length(uv))) > s {"a" [0.0811552], "b" [0.3552998], "c" [0.996772]} > gset_is_equal(s, s) [1] FALSE > s == s [1] FALSE > class(s) [1] "gset" "cset" > Best r

Re: [R] svm of e1071 package

2010-04-06 Thread Saeed Abu Nimeh
I think the problem is that you have R configured as 32-bits. If that is the case, then you will only have access to 4 gigs of RAM (see http://www.brianmadden.com/blogs/brianmadden/archive/2004/02/19/the-4gb-windows-memory-limit-what-does-it-really-mean.aspx). Try booting up an ubuntu instance in t

Re: [R] c(), or cat(), or paste(), all cause unwanted reordering

2010-04-06 Thread Nikos Alexandris
Jeff Brown wrote: > > Wow, you guys are awesome. Thanks! Nikos Alexandris wrote: > Thanks for the "cat()" question Jeff and to all guRus out there for the > replies. This is something I was looking for the last hour. I can't seem to make this run: I have a function ( Column.of.Matrix.1 , Column

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Roger DeAngelis(xlr82sas)
Hi, First a quick note about FDA and Style Guides. Frank is correct the FDA does not require strict formatting. I once worked for small startup and they sent EXCEL sheets to the FDA. However big pharma usually has very strict formatting requirements. I once produced a table where one of the

Re: [R] help in function in R akin to macro in SAS

2010-04-06 Thread Thomas Lumley
On Tue, 6 Apr 2010, Stuart Luppescu wrote: On Tue, 2010-04-06 at 09:33 -0700, Changbin Du wrote: #plot function plotxyf<-function (data) { plot(data, type="mapping", labels=final$target, col=final$outcome+1,, main="Supervised: Mapping plot for data") Change this to: main=paste("Supervised: M

Re: [R] help in function in R akin to macro in SAS

2010-04-06 Thread Gang Liang
A small correction. On Tue, Apr 6, 2010 at 9:43 AM, Stuart Luppescu wrote: > On Tue, 2010-04-06 at 09:33 -0700, Changbin Du wrote: > > #plot function > > plotxyf<-function (data) { > > > > plot(data, type="mapping", labels=final$target, col=final$outcome+1,, > > main="Supervised: Mapping plot for

Re: [R] median of two groups

2010-04-06 Thread Thomas Lumley
None of them. - mood.test() looks promising until you read the help page and see that it does not do Mood's test for equality of quantiles, it does Mood's test for equality of scale parameters. - wilcox.test() is not a test for equal medians - ks.test() is not a test for equal medians. M

Re: [R] glmpath in R

2010-04-06 Thread Claire Wooton
Steve Lianoglou gmail.com> writes: > > Hi Claire, > > I'm replying and CC-ing to the R-help list to get more eyes on your > question since others will likely have more/better advice, and perhaps > someone else in the future will have a similar question, and might > find this thread handy. > >

Re: [R] help in function in R akin to macro in SAS

2010-04-06 Thread Stuart Luppescu
On Tue, 2010-04-06 at 09:33 -0700, Changbin Du wrote: > #plot function > plotxyf<-function (data) { > > plot(data, type="mapping", labels=final$target, col=final$outcome+1,, > main="Supervised: Mapping plot for data") Change this to: main=paste("Supervised: Mapping plot for", data) > >

Re: [R] Out of sample forecast

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 12:25 PM, Luis Felipe Parra wrote: Hello I am trying to use predict, but I am having trouble getting out of sample predictions. I am getting the same output if I use the following three commands: predict(ModeloLineal,predictors[721:768,]) predict(ModeloLineal,predictors[

[R] help in function in R akin to macro in SAS

2010-04-06 Thread Changbin Du
Dear Whom it may concern, I need help to figure the "macro" function in R: I need to plot the different data sets by a plotxyf function, I want the title to be different for different data set. # get the data set final.xyf<- xyf(data=as.matrix(my.final), Y=classvec2classmat(final$outcome), xwe

[R] Out of sample forecast

2010-04-06 Thread Luis Felipe Parra
Hello I am trying to use predict, but I am having trouble getting out of sample predictions. I am getting the same output if I use the following three commands: predict(ModeloLineal,predictors[721:768,]) predict(ModeloLineal,predictors[1:768,]) predict(ModeloLineal) where ModeloLineal is the out

Re: [R] approx function wierd result

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 12:13 PM, marta rufino wrote: ok, not really sorted :-(does not work in other values,...and I am not really sure how to come over it x=c(0.0191,0.0088,0.0150,0.0105,0.0430,0.0697,0.1999) y=c(58,107,152,239,362,512,724) x1=0.02220172 kk=y[x==min(x)] approxExtrap(x[y>kk],y[y

Re: [R] approx function wierd result

2010-04-06 Thread marta rufino
ok, not really sorted :-(does not work in other values,...and I am not really sure how to come over it x=c(0.0191,0.0088,0.0150,0.0105,0.0430,0.0697,0.1999) y=c(58,107,152,239,362,512,724) x1=0.02220172 kk=y[x==min(x)] approxExtrap(x[y>kk],y[y>kk],x1, method="linear") approx(x[y>kk],y[y>kk],x1) pl

Re: [R] approx function wierd result

2010-04-06 Thread marta rufino
Thank David, That is completely correct! I have no ideia how come matlab and Octave do not do this... maybe the interp1 function has some kind of trick. .. maybe the algorythm looks for the closest ranked values and not by its true value. What ever... Just sort it out in a not prety-but efficient

Re: [R] svm of e1071 package

2010-04-06 Thread Steve Lianoglou
Hi, On Tue, Apr 6, 2010 at 8:07 AM, Shyamasree Saha [shs] wrote: > Hello List, > > I am having a great trouble using svm function in e1071 package. I have 4gb > of data that i want to use to train svm. I am using Amazon cloud, my Amazon > Machine Image(AMI) has 34.2 GB of memory. my R process w

[R] Caret package and lasso

2010-04-06 Thread linda garcia
Dear all, I have used following code but everytime I encounter a problem of not having coefficients for all the variables in the predictor set. # code rm(list=ls()) library(caret) # generating response and design matrix X<-matrix(rnorm(50*100),nrow=50) y<-rnorm(50*1) # Applying caret package

Re: [R] memory error

2010-04-06 Thread Matthew Dowle
> someone else on this list may be able to give you a ballpark estimate > of how much RAM this merge would require. I don't have an absolute estimate, but try data.table::merge, as it needs less working memory than base::merge. 20 million rows of 5 columns isn't beyond 32bit : (1*4 + 4*8)*197

Re: [R] glmpath in R

2010-04-06 Thread Steve Lianoglou
Hi Claire, I'm replying and CC-ing to the R-help list to get more eyes on your question since others will likely have more/better advice, and perhaps someone else in the future will have a similar question, and might find this thread handy. I've removed your specific research aim since that might

Re: [R] approx function wierd result

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 10:42 AM, marta rufino wrote: Dear R-list members, I am calculating the linear extrapolation for a data set, using the function found in Hmisc. x=c(0.0265,-0.0003,0.0142,0.0263,0.0634,0.1145,0.2504) y=c(58,107,152,239,362,512,724) x1=0.0393216 approxExtrap(x,y,x1, method

Re: [R] Extracting formulae from expression() / deriv()

2010-04-06 Thread Danne Mora
On Tue, Apr 6, 2010 at 9:09 AM, nickymcp https://stat.ethz.ch/mailman/listinfo/r-help>> wrote: >* *>* I am attempting to extract the derivative/ gradient from this expression *>* *>* df1p <- deriv(f1, "P") *>>* df1p *>* expression({ *>*.value <- s - c - a * P *>*.grad <- array(0, c(length(.

Re: [R] c(), or cat(), or paste(), all cause unwanted reordering

2010-04-06 Thread Nikos Alexandris
On Thu, 2010-03-25 at 11:54 -0800, Jeff Brown wrote: > Wow, you guys are awesome. Thanks! Thanks for the "cat()" question Jeff and to all guRus out there for the replies. This is something I was looking for the last hour. Nikos __ R-help@r-project.or

[R] approx function wierd result

2010-04-06 Thread marta rufino
Dear R-list members, I am calculating the linear extrapolation for a data set, using the function found in Hmisc. x=c(0.0265,-0.0003,0.0142,0.0263,0.0634,0.1145,0.2504) y=c(58,107,152,239,362,512,724) x1=0.0393216 approxExtrap(x,y,x1, method="linear") approx(x,y,x1) #to see what is happening: pl

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread hadley wickham
>  Also I have seen 5,000 page listings in SAS. Is this a pro or a con? Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ __ R-help@r-project.org mailing list https://stat.ethz.c

[R] [R-pkgs] betareg 2.2-2: Beta regression

2010-04-06 Thread Achim Zeileis
Dear useRs, version 2.2-2 of the "betareg" package has just been released on CRAN http://CRAN.R-project.org/package=betareg accompanied by an article in the Journal of Statistical Software http://www.jstatsoft.org/v34/i02/ The package provides beta regression for data in the unit interval

[R] [R-pkgs] Formula 1.0-0: Model formulas with multiple parts and responses

2010-04-06 Thread Achim Zeileis
Dear useRs, version 1.0-0 of the "Formula" package has just been released on CRAN http://CRAN.R-project.org/package=Formula accompanied by an article in the Journal of Statistical Software http://www.jstatsoft.org/v34/i01/ It provides simple infrastructre for processing formulas like y

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Frank E Harrell Jr
Roger DeAngelis(xlr82sas) wrote: Hi, About the forest plot. Some Phrarma companies demand the report and graphics follow very restrictive layouts. Thank goodness that the FDA does not require that. Frank SAS allows uses to use one template for graphs and tables. Margins have to

Re: [R] Extracting formulae from expression() / deriv()

2010-04-06 Thread Henrique Dallazuanna
df1p is a expression, and you can use later. On Tue, Apr 6, 2010 at 11:00 AM, nickymcp wrote: > > Thanks for your help - this works and I get > >> s <- 2 >> c <- 3 >> a <- 2 >> P <- 1 >> attributes(eval(df1p))$gradient[,'P'] >  P > -2 > > What I really wanted was an expression that I can use late

Re: [R] checking bivariate normality

2010-04-06 Thread David Winsemius
On Apr 6, 2010, at 7:48 AM, arindam fadikar wrote: x <- iris$Sepal.Length[1:50]/iris$Sepal.Width[1:50] y <- iris$Petal.Length[1:50]/iris$Petal.Width[1:50] I want to check whether (x,y) follows a bivariate normal distribution or not, using density plot or scatter plot. Is it possible to plot

Re: [R] Extracting formulae from expression() / deriv()

2010-04-06 Thread nickymcp
Thanks for your help - this works and I get > s <- 2 > c <- 3 > a <- 2 > P <- 1 > attributes(eval(df1p))$gradient[,'P'] P -2 What I really wanted was an expression that I can use later - do you think there's any way to do this? -- View this message in context: http://n4.nabble.com/Extract

Re: [R] Data manipulation problem

2010-04-06 Thread moleps islon
OK... next question.. Which is still a data manipulation problem so I believe the heading is still OK. ##So now I read my population data from excel. pop<-read.csv("pop.csv") typeof(pop) ## yields a list where I have age-specific population rows and a yearly column population, where the years are

Re: [R] Extracting formulae from expression() / deriv()

2010-04-06 Thread Henrique Dallazuanna
Try fixing the constants s <- 2 c <- 3 a <- 2 P <- 1 attributes(eval(df1p))$gradient[,'P'] On Tue, Apr 6, 2010 at 10:30 AM, nickymcp wrote: > >> f1 > ~s - c - a * P > -- > View this message in context: > http://n4.nabble.com/Extracting-formulae-from-expression-deriv-tp1752738p1752816.html > Se

Re: [R] Extracting formulae from expression() / deriv()

2010-04-06 Thread nickymcp
> f1 ~s - c - a * P -- View this message in context: http://n4.nabble.com/Extracting-formulae-from-expression-deriv-tp1752738p1752816.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.

  1   2   >