Re: [R] Re :reading large file

2010-05-01 Thread Tal Galili
Hi Mohan, Check: dim(bmtrend) If the output is like the dimension of your data, then it would appear you succeeded in reading in the data :) Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845

Re: [R] Re :reading large file

2010-05-01 Thread Mohan L
On Sat, May 1, 2010 at 11:55 AM, Tal Galili tal.gal...@gmail.com wrote: Hi Mohan, Check: dim(bmtrend) If the output is like the dimension of your data, then it would appear you succeeded in reading in the data :) Yes . You are right. It reads all the data. Thanks you. Mohan L

[R] Resize Graphics Window

2010-05-01 Thread Sigal Blay
Need way to resize an existing graphics window. This should be applicable across platforms (as part of a package). Context: function1() draws main plot (I'm using grid), function2() adds smaller plot above main plot, but this one can sometimes overflow the original graphics window area.

[R] 3D Surface plot

2010-05-01 Thread abotaha
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's figure. the R code is x -

[R] installing R2.11 on RHEL5.3

2010-05-01 Thread V N
I am trying to install R2.11 on RHEL5.3. The main code and base packages compile fine and get installed to \usr\local\R211 (which I set using --prefix). I would like to install a set of contrib packages (car, ggplot2, etc.) also to the same location. Once R is fired up, I can do

[R] Solving equation

2010-05-01 Thread Shant Ch
Hello, 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. Error in

Re: [R] Re :reading large file

2010-05-01 Thread John Ramey
You should also check out the functions head() and tail(). For instance, if you type head(bmtrend), the first few rows of your data will be displayed. Also, if you type tail(bmtrend), then the last few rows will be displayed. -- John A. Ramey, M.S. Ph.D. Candidate Department of Statistical

Re: [R] how to set chart output size in rgl (surface3d)?

2010-05-01 Thread Mandy Xu
i tried using your suggestion but still can't manipulate the dimensions such that the chart fills the whole window. i've attached the picture i get when i tried your suggested method. as you can see, there's still a lot of white space around it. is there anyway i can: a) output to png ONLY the 3d

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

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] 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. Error

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

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

[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] 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

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

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

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 :

[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

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, upper = 2, tol = 0.001 )

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

[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

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

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

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 chrish...@psyctc.org 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

[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: ##

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 up a

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

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, or

[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 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

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 end i suppose one

[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

[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/09xxx

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 http://eusebe.github.com/ascii/. Just choose your favorite markup language (asciidochttp://www.methods.co.nz/asciidoc/, txt2tags http://txt2tags.sourceforge.net/, restructuredtexthttp://docutils.sourceforge.net/rst.html, org-mode http://orgmode.org/ or

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 to

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

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 brave...@gmail.com wrote: Hello,

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 kende...@yahoo.fr wrote: Hello I would like to perform with R, a binary logistic regression analysis taking account

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 31

[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] 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) +

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] 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] 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; +

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

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 Format error

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(returnlist) + +

[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 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-!bool; +

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 ted.hard...@manchester.ac.ukwrote: See below. On 01-May-10 19:14:08, steven mosher wrote: maybe I can

[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*

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 gr...@rand.org 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

[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

Re: [R] Re :

2010-05-01 Thread jim holtman
?View On Sat, May 1, 2010 at 1:32 AM, Mohan L l.mohan...@gmail.com 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

[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:

[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

[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

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] 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,

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

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 paell...@yahoo.fr 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