Re: [R] Resize Graphics Window

2010-05-01 Thread Tal Galili
Hi Sigal, could you give a simple example ? I can imagine in some cases that enlarging the windows would help, but on others there are other parameters you would like to play with instead. So having an example to solve, will help people help you. Tal Contact Details:---

Re: [R] Sourcing functions

2010-05-01 Thread Sharpie
David Winsemius wrote: > > If you read the Installation and Administration document you should > find material on that process. Look for the section that describes the > care and feeding of .Rprofile or type > > ?Startup # in an R console session. > And when you are ready, the "Writing

Re: [R] Sourcing functions

2010-05-01 Thread jim holtman
?Startup You can have it automatically load your favorite functions at startup. On Sat, May 1, 2010 at 6:22 PM, paellota wrote: > > Hello, > > I'm quite a noob on R. I just wanted to know: is there a way to definitely > teach R a new function or do I have to source the code of the function in >

Re: [R] Sourcing functions

2010-05-01 Thread David Winsemius
On May 1, 2010, at 6:22 PM, paellota wrote: Hello, I'm quite a noob on R. I just wanted to know: is there a way to definitely teach R a new function or do I have to source the code of the function in every new session? If you read the Installation and Administration document you should

[R] rworldmap

2010-05-01 Thread Steve Hempell
I see that the script didn't make it. So made script text file. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] Text dependent on a variable in a R function

2010-05-01 Thread Charles C. Berry
On Sun, 2 May 2010, R K wrote: Hello, I was wondering if someone could tell me how I can make text dependent on a variable in a R function I have created. example( deparse ) HTH, Chuck The function will create plots, thus I would like each plot to have a unique title based on

[R] Text dependent on a variable in a R function

2010-05-01 Thread R K
Hello, I was wondering if someone could tell me how I can make text dependent on a variable in a R function I have created. The function will create plots, thus I would like each plot to have a unique title based on the inputted variable as well as a unique file name when saved using the sa

[R] Sourcing functions

2010-05-01 Thread paellota
Hello, I'm quite a noob on R. I just wanted to know: is there a way to definitely teach R a new function or do I have to source the code of the function in every new session? Thanks for your answer... -- View this message in context: http://r.789695.n4.nabble.com/Sourcing-functions-tp2122413p

[R] Scree diagram,

2010-05-01 Thread Philip Wong
hello, I've two questions today. 1) I'm trying to do a scree diagram, I did a Google for a specific command I could used to do so. All I could find is a screeplot. Are they the same command? 2) what command can I used to present a PC scores, eigenvectors of the PC scores, and component correlat

Re: [R] Re :

2010-05-01 Thread jim holtman
?View On Sat, May 1, 2010 at 1:32 AM, Mohan L wrote: > Hi All, > > I am new to R and the mailing list. > > I have a data file (.xls) format with little bit large (16 column,35000 > rows > ) data file. I am trying to read this file for calculation. I have > converted the file into .csv format an

[R] rworldmap

2010-05-01 Thread Steve Hempell
I am trying to get a legend to work in rworldmap. I have no programing experience and a newbie to R. I will attach a very small database and R script that I am using - hope that is OK. I seem to get a legend using a vector in catMethod. Howerver I get error or warning messages regarding the col

Re: [R] bag.fraction in gbm package

2010-05-01 Thread Changbin Du
Thanks, it really helps! On Sat, May 1, 2010 at 2:34 PM, Ridgeway, Greg wrote: > See friedman's paper "stochastic gradient boosting" > > Greg > > -- > *From*: Changbin Du > *To*: Ridgeway, Greg > *Cc*: r-help@r-project.org > *Sent*: Sat May 01 14:20:23 2010 > *Subje

[R] bag.fraction in gbm package

2010-05-01 Thread Changbin Du
Hi, Dear Greg, Sorry to bother you again. I have several questions about the 'gbm' package. if the train.fraction is less than 1 (ie. 0.5) , then the* first* 50% will be used to fit the model, the other 50% can be used to estimate the performance. if bag.fraction is 0.5, then gbm use the* rando

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread steven mosher
thanks ted.. being new the R thsi has been a huge help, espececially on the Myint=myint thing... I assummed the name was just implicit. On Sat, May 1, 2010 at 1:19 PM, Ted Harding wrote: > See below. > > On 01-May-10 19:14:08, steven mosher wrote: > > maybe I can illustrate the problem by showi

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread Ted Harding
See below. On 01-May-10 19:14:08, steven mosher wrote: > maybe I can illustrate the problem by showing how a c programmer > might think about the problem and the kinds of mistakes 'we' (I) > make when trying to do this in R > > cstruct<-function(int, bool){ > + > + myint<- int*2; > + > + mybool<

[R] Error in MEEM

2010-05-01 Thread Vaquero-Alba, Iker
Hello everyone: It's the first time I write to this mailing list. Sorry in advance if my doubt has already been posted before, but I have been checking the archives and I haven't been able to find anything satisfactory. I am running a mixed effects model with nested effects (site and

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread steven mosher
> cstruct<-function(int, bool){ + + myint<- int*2; + + mybool<-!bool; + myvec<-rep(mybool,10) + + mymat<-matrix(myint*10,nrow=3,ncol=3) + myframe<-data.frame(int=rep(myint,5),bool=rep(bool,5)) + returnlist<-list(myint=myint,mybool=mybool,myvec=myvec,mymat=mymat,myframe + =myframe) + return(returnli

Re: [R] Errors when trying to open odfWeave documents

2010-05-01 Thread Paul
Paul wrote: > Paul wrote: > >> Hello >> >> I tried the odfWeave package today, by running the formatting.odt and >> example.odt files that are included with the package. >> >> They both ran fine, but when I try to open them in my OpenOffice >> (OpenOffice 3.1.1 on Kubuntu 9.10) I get an error

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread steven mosher
perfect. I had tried a variant assigning names,to the vars, but that didnt work. now it makes sense why that didnt. I had tried myint<-int names(myint)<-myint" and then returnlist<-list(myint, .) and of course test[1] got me myint, 6 Thanks On Sat, May 1, 2010 at 12:42 PM, David W

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread David Winsemius
On May 1, 2010, at 3:14 PM, steven mosher wrote: maybe I can illustrate the problem by showing how a c programmer might think about the problem and the kinds of mistakes 'we' ( I) make when trying to do this in R cstruct<-function(int, bool){ + + myint<- int*2; + + mybool<-!bool; + myvec<-

Re: [R] Average Login based on date

2010-05-01 Thread David Winsemius
On May 1, 2010, at 2:07 PM, Mohan L wrote: Hi All, I have the data like this : sample <- read.csv(file="sample.csv",sep=",",header=TRUE) sample stdate Domainsex age Login 1 01/11/09xxx FeMale 25 2 2 01/11/09xxx FeMale 35 4 3 01/11/09xxx Male 1830 4

Re: [R] binary logistic regression taking account clustering

2010-05-01 Thread David Freedman
The bootcov function for models fit using lrm in the rms package might also be an option hth -- View this message in context: http://r.789695.n4.nabble.com/binary-logistic-regression-taking-account-clustering-tp2122255p2122311.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread steven mosher
maybe I can illustrate the problem by showing how a c programmer might think about the problem and the kinds of mistakes 'we' ( I) make when trying to do this in R cstruct<-function(int, bool){ + + myint<- int*2; + + mybool<-!bool; + myvec<-rep(mybool,10) + mymat<-matrix(myint*10,nrow=3,ncol=3) +

[R] cbind and automatic type conversion

2010-05-01 Thread Giovanni Azua
Hello, I have three method types and 100 generalization errors for each, all in the range [0.65,0.81]. I would like to make a stacked histogram plot using ggplot2 with this data ... Therefore I need a data frame of the form e.g. Method GE -- --

Re: [R] Average Login based on date

2010-05-01 Thread jim holtman
try this: > x <- read.table(textConnection("stdate Domainsex age Login + 1 01/11/09xxx FeMale 25 2 + 2 01/11/09xxx FeMale 35 4 + 3 01/11/09xxx Male 1830 + 4 01/11/09xxx Male 31 3 + 5 02/11/09xxx Male 3211 + 6 02/11/09xxx Male

Re: [R] binary logistic regression taking account clustering

2010-05-01 Thread Thomas Stewart
See help(lmer, package="lme4") for a mixed-effects model approach. See help(geeglm, package="geepack") for a GEE approach. -tgs On Sat, May 1, 2010 at 1:52 PM, kende jan wrote: > Hello > > I would like to perform with R, a binary logistic regression analysis > taking account clustering >

Re: [R] ggplot2's geom_errorbar legend

2010-05-01 Thread Ista Zahn
Hi Giovanni, A reproducible example would help. Also, since I think this will be tricky, it might be a good idea to post it to the ggplot2 mailing list (you can register at http://had.co.nz/ggplot2/ ). Best, Ista On Sat, May 1, 2010 at 1:34 PM, Giovanni Azua wrote: > Hello, > > I create a simpl

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-01 Thread Max Gunther
I normally do not post "thank-yous" to listservs but this is really quite a remarkable response and I really appreciate the guidance. I am certain that this will increase the accuracy and productivity of our research. Best of wishes, Max Max Gunther, PhD Vanderbilt University Medical Center Depa

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-01 Thread Max Kuhn
Chris, > Come on R core team: I am sure there are a large number of users like > Max Gunther and myself who would find this a huge help and I'm equally > sure there are an even larger number of potential users who would change > to R if we had formatted tables in the output window and the option t

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-01 Thread David Hajage
Another option is to use ascii package . Just choose your favorite markup language (asciidoc, txt2tags , restructuredtext, org-mode

[R] Average Login based on date

2010-05-01 Thread Mohan L
Hi All, I have the data like this : >sample <- read.csv(file="sample.csv",sep=",",header=TRUE) > sample stdate Domainsex age Login 1 01/11/09xxx FeMale 25 2 2 01/11/09xxx FeMale 35 4 3 01/11/09xxx Male 1830 4 01/11/09xxx Male 31 3 5 02/11/09

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread Ted Harding
On 01-May-10 16:58:49, Giovanni Azua wrote: > > On May 1, 2010, at 6:48 PM, steven mosher wrote: >> I was talking with another guy on the list about this very topic. >> >> A simple example would help. >> >> first a sample C struct, and then how one would do the equivalent in >> R. >> >> In the

[R] binary logistic regression taking account clustering

2010-05-01 Thread kende jan
Hello I would like to perform with R, a binary logistic regression analysis taking account clustering (A randomized trial into 2 groups, patients within 50 hospitals): y (0,1) is the outcome x1, x2 indivifdual’s characteristics x3,x4 hospitals’ characteristics. Thanks in advance Jan

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread steven mosher
Ya, thats a common one. also writing a struct to file and reading a struct from file. mostly in R if I have multiple returns, I'm just talking two or three values so i return a results vector. but thats ugly and prone to very bad things down the road. On Sat, May 1, 2010 at 9:58 AM, Giovanni Azu

[R] Create Table & Delete Table using JDBC

2010-05-01 Thread zubin
Hello, using RJDBC within R and successful at fetching and writing data, one quick question that I can't find an answer to: Running a drop table and create table query, they run and they work, but R returns a error. I am using dbSendQuery - i thought dbSend just submits SQL and does not expect

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread Giovanni Azua
On May 1, 2010, at 6:48 PM, steven mosher wrote: > I was talking with another guy on the list about this very topic. > > A simple example would help. > > first a sample C struct, and then how one would do the equivalent in R. > > In the end i suppose one want to do a an 'array' of these structs

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread steven mosher
I was talking with another guy on the list about this very topic. A simple example would help. first a sample C struct, and then how one would do the equivalent in R. In the end i suppose one want to do a an 'array' of these structs, or list of the structs. On Sat, May 1, 2010 at 8:04 AM, Ted H

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread Giovanni Azua
On May 1, 2010, at 5:04 PM, (Ted Harding) wrote: > Well, 'list' must be pretty close! The main difference would be > that in C the structure type would be declared first, and then > applied to create an object with that structure, whereas an R > lists are created straight off. If you want to set u

[R] bootstrap generalization error

2010-05-01 Thread Giovanni Azua
Hello, I use the following function "bootstrapge" to calculate (and compare) the generalization error of several bootstrap implementations: ## ## Calculates and returns a coefficient corresponding to the generalization ## error. The formula for the bootstrap generalization error is: ## $N^{-1}\

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-01 Thread Gabor Grothendieck
On Sat, May 1, 2010 at 3:41 AM, Chris Evans wrote: > It's interesting to see this coming up quite soon after my posting > asking for light formatting (tabs, simple tables, one day embedded > graphics) in a default output pane in R. > > Greg Snow kindly pointed me to sword and I've tried it and it

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread Ted Harding
On 01-May-10 14:46:28, Giovanni Azua wrote: > Hello, > What would be in R the closest match to a c-struct? e.g. data.frame > requires all elements to be of the same length ... or is there a way to > circumvent this? > > TIA, > Best regards, > Giovanni Well, 'list' must be pretty close! The main d

Re: [R] closest match in R to c-like struct?

2010-05-01 Thread Duncan Murdoch
On 01/05/2010 10:46 AM, Giovanni Azua wrote: Hello, What would be in R the closest match to a c-struct? e.g. data.frame requires all elements to be of the same length ... or is there a way to circumvent this? A list is completely free-form. An S4 object has a defined structure. So if you

[R] closest match in R to c-like struct?

2010-05-01 Thread Giovanni Azua
Hello, What would be in R the closest match to a c-struct? e.g. data.frame requires all elements to be of the same length ... or is there a way to circumvent this? TIA, Best regards, Giovanni __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

Re: [R] Solving equation

2010-05-01 Thread Peter Ehlers
On 2010-05-01 7:13, Berend Hasselman wrote: David Winsemius wrote: On May 1, 2010, at 3:28 AM, Berend Hasselman wrote: Shant Ch wrote: I want to solve: x*(3^x)*log(4)-x*log(4/3)-(3^x)+1=0 for x. I used the following code, uniroot(function(x) x*(3^x)*log(4)-x*log(4/3)-(3^x)+1, lower =

Re: [R] Solving equation

2010-05-01 Thread Berend Hasselman
David Winsemius wrote: > > > On May 1, 2010, at 3:28 AM, Berend Hasselman wrote: > >> >> >> Shant Ch wrote: >>> >>> I want to solve: x*(3^x)*log(4)-x*log(4/3)-(3^x)+1=0 for x. I used >>> the >>> following code, >>> >>> uniroot(function(x) x*(3^x)*log(4)-x*log(4/3)-(3^x)+1, lower = -2, >>>

[R] ggplot2's geom_errorbar legend

2010-05-01 Thread Giovanni Azua
Hello, I create a simple ggplot that only shows a straight line. I then add three datasets of CI using the geom_errorbar function. The problem is that I can't find any way to have the legend showing up ... I need to show what each color of the CIs corresponds to i.e. which method. Can anyone

Re: [R] Re :

2010-05-01 Thread David Winsemius
On May 1, 2010, at 1:32 AM, Mohan L wrote: Hi All, I am new to R and the mailing list. I have a data file (.xls) format with little bit large (16 column, 35000 rows ) data file. I am trying to read this file for calculation. I have converted the file into .csv format and read like that :

Re: [R] Solving equation

2010-05-01 Thread David Winsemius
On May 1, 2010, at 3:28 AM, Berend Hasselman wrote: Shant Ch wrote: I want to solve: x*(3^x)*log(4)-x*log(4/3)-(3^x)+1=0 for x. I used the following code, uniroot(function(x) x*(3^x)*log(4)-x*log(4/3)-(3^x)+1, lower = -2, upper = 2, tol = 0.001 ) While using this I am getting the fo

Re: [R] 3D Surface plot

2010-05-01 Thread Peter Ehlers
On 2010-04-30 13:35, abotaha wrote: Dear All, I want to create a surface plot from the data. My data set is consists of x, y and z data. I plotted in very easy way by Excel worksheet as shown in the attached picture. I did some steps in R, but I cannot have the same plot as in Excel worksheet'

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-01 Thread Tal Galili
Hi all, I forwarded this question to the r-com mailing list, and received the following reply from Thomas Baier : Hi Tal, two solutions immediately come to my mind: SWord (http://rcom.univie.ac.at) and R2wd (from CRAN). If creating a paper in Word, then SWord may be the better choice, if you w

[R] stars plot - how to changing petal angle by weight ?

2010-05-01 Thread Tal Galili
Hello all, I am wondering how the ?stars function might be changed so it will get another parameter (petal.weight) that describes the "weight" for each petal of the flower (star) plot. The way this weight will effect is by reducing the angle of the petal by the weights proportion. So for example,

Re: [R] select subset of data according to date range

2010-05-01 Thread Jim Lemon
On 05/01/2010 02:55 PM, Carol Gao wrote: Dear R lists, ... Would anyone help me with setting data frames according to the date? ... my data looks like above, but definitely with more rows. Now I want a data frame with only "2008-12-02" in the first part of the 8th variable---Time. Hi Carol, I w

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-01 Thread Chris Evans
It's interesting to see this coming up quite soon after my posting asking for light formatting (tabs, simple tables, one day embedded graphics) in a default output pane in R. Greg Snow kindly pointed me to sword and I've tried it and it seems to work and is a bit friendlier than ODFweave or the xt

Re: [R] Solving equation

2010-05-01 Thread Berend Hasselman
Shant Ch wrote: > > I want to solve: x*(3^x)*log(4)-x*log(4/3)-(3^x)+1=0 for x. I used the > following code, > > uniroot(function(x) x*(3^x)*log(4)-x*log(4/3)-(3^x)+1, lower = -2, upper = > 2, tol = 0.001 ) > > While using this I am getting the following error. Can anyone please help > me out.

Re: [R] plotting multiple CIs

2010-05-01 Thread Jim Lemon
On 05/01/2010 12:10 AM, Giovanni Azua wrote: Hello, I need to plot multiple confidence intervals for the same model parameter e.g. so for the same value of the parameter in point x_1 I would like to see four different confidence intervals so that I can compare the accuracy e.g. boot basic vs

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-01 Thread Jim Lemon
On 05/01/2010 08:13 AM, Max Gunther wrote: Dear "R" list, Our statisticians usually give us results back in a PDF format. I would like to be able to copy and past tables from "R" output directly into a Microsoft Word table since this will save us tons of time, be more accurate to minimize human