Re: [R] How to assign height value on bar plot?

2012-05-27 Thread Greg Snow
Did you look at the help page that Uwe directed you to? At least one of the examples on that page demonstrates adding text to a barplot. But before you do that you should read through the discussion here: http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html on why you might not want to add

Re: [R] a simple mixed model

2012-05-27 Thread peter dalgaard
On May 27, 2012, at 07:12 , array chip wrote: Hi, I was reviewing a manuscript where a linear mixed model was used. The data is simple: a response variable y was measured for each subject over 3 time points (visit 1, 2 and 3) that were about a week apart between 2 visits. The study is a

Re: [R] barplot problem

2012-05-27 Thread Jim Lemon
On 05/27/2012 01:26 PM, jack hietpas wrote: Hello- I am having trouble making a barplot... The y-values are: data=c(-0.0002129061,0.00,-0.0002699561,0.0163883061,0.04). The x-values are distance=c(0, 71, 172, 206, 292). The desired x-range is 0 and ~300+ (kilometers),

Re: [R] a simple mixed model

2012-05-27 Thread peter dalgaard
On May 27, 2012, at 10:10 , array chip wrote: Hi Peter, I might be unclear in my description of the data. Each patient was measured for a response variable y at 3 time points, there is no drug or other treatment involved. The objective was to examine the repeatability of the measurements

Re: [R] a simple mixed model

2012-05-27 Thread array chip
Hi Peter, I might be unclear in my description of the data. Each patient was measured for a response variable y at 3 time points, there is no drug or other treatment involved. The objective was to examine the repeatability of the measurements of response variable y. Since this is repeated

Re: [R] Customized R Regression Output?

2012-05-27 Thread Özgür Asar
Dear Christian, An illustrative and simple example follows: y-rnorm(100,0,1) #response variable x1-rnorm(100,0,1) #1st covariate x2-rnorm(100,0,1) #2nd covariate lm1-lm(y~x1+x2) #fitting a linear model cbind(summary(lm1)$coef[,1],summary(lm1)$coef[,1]) # obtaining the estimates and

Re: [R] Customized R Regression Output?

2012-05-27 Thread Özgür Asar
Sorry for my typo, Last line of the R script should be cbind(summary(lm1)$coef[,1],summary(lm1)$coef[,4]) # obtaining the estimates and related p-values Best Ozgur - Ozgur ASAR Research Assistant Middle East Technical University Department of

Re: [R] R base package grid does not output raster image

2012-05-27 Thread Uwe Ligges
On 26.05.2012 23:09, Patrick Nicholson wrote: Thanks Uwe, I had tried this before but hearing it again made me realize what I was doing incorrectly. I still can't get it to work with grid.draw(), but here is the solution with ggplot(): I don't see why the Remote Desktop Connection issue

Re: [R] Customized R Regression Output?

2012-05-27 Thread Chris87
Dear Rui and Ozgur Thanks to both of you for your swift and helpful responses! The idea with the loop is great and the cbind() function is also what I am looking for. However, is it also possible to summarize the estimators and p-values for each data set y in one table only? For example,

[R] Customized R Regression Output?

2012-05-27 Thread Chris87
Hello R-Experts, I am facing the problem that I have to estimate several parameters for a lot of different dependent variables. One single regression looks something like this: y = beta0 + beta1 * x1 + beta2 * x2 + beta3 * x1 * x2 + beta4 * x4 + beta5 * lag(x4,-1) where y is the dependent

Re: [R] Problem with readHTMLTable

2012-05-27 Thread Sven D
Thanks Michael, thanks Arun, silly enough, I actually had to restart the whole thing. And the function now performs pretty well. Many thanks Sven -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-readHTMLTable-tp4631439p4631498.html Sent from the R help mailing

[R] Webscraping Data RCurl

2012-05-27 Thread Sven D
Hello, I am trying to gather data from the following page: http://toast.gasunie.de/Pages/search.aspx?lang=ensoid=GUD I am trying to get hourly data. I did the following: url = http://toast.gasunie.de/Pages/search.aspx?lang=ensoid=GUD; getFormParams(url) fair enough, this did not return any

Re: [R] Customized R Regression Output?

2012-05-27 Thread Özgür Asar
Your welcome, To extract R squared values, you can use summary(lm1)$r.squared and include it in the cbind as result1-cbind(summary(lm1)$coef[,1],summary(lm1)$coef[,1],summary(lm1)$r.squared) To add the results of multiple outputs you can use rbind such as rbind(result1,result2) where

Re: [R] Customized R Regression Output?

2012-05-27 Thread Rui Barradas
Hello, Do I really have to type in each single regression for each data set and copy the output into a table manually? No, using paste/as.formula you can do it in a loop. Example: x1 - 1:100 x2 - log(x1^2) y1 - x1 + x2 + rnorm(100) y2 - x1*runif(100, 0.5, 1.0) + x2 + rnorm(100)

[R] linux

2012-05-27 Thread Soheila Khodakarim
Dear All Pleade give me an URL that I can download R for cenos linux 64 bit. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] linux

2012-05-27 Thread Marc Schwartz
On May 27, 2012, at 9:45 AM, Soheila Khodakarim wrote: Dear All Pleade give me an URL that I can download R for cenos linux 64 bit. R is available from the EPEL for RHEL, CentOS and Scientific Linux: http://fedoraproject.org/wiki/EPEL Regards, Marc Schwartz

Re: [R] linux

2012-05-27 Thread ya
Hi, you may need to compile the source code yourself. Then you also need the F77 compiler. It seems most of the linux distro do not have this compiler. You need to find it online yourself. I never succeed in doing this. I would like to know how you proceed this compilation. I also want to

Re: [R] linux

2012-05-27 Thread Rich Shepard
On Sun, 27 May 2012, ya wrote: you may need to compile the source code yourself. Then you also need the F77 compiler. It seems most of the linux distro do not have this compiler. You need to find it online yourself. I never succeed in doing this. I would like to know how you proceed this

Re: [R] linux

2012-05-27 Thread ya
Hi Rich£¬ You mean, the R source code package contains the FORTRAN code? I install gcc every time before I try to compile R, still, it shows lack of a bunch of compilers... ya From: Rich Shepard Date: 2012-05-27 18:14 To: r-help Subject: Re: [R] linux On Sun, 27 May 2012, ya wrote: you

Re: [R] barplot problem

2012-05-27 Thread jack hietpas
Hi Jim- Thanks for your help. I am not sure how to execute your instructions... I used the space argument to to equally space the bars (barplot(data, space=c(1,1,1,1,1,1)). How do I get the x positions in the return values. Take care, -jh On Sun, May 27, 2012 at 3:42 AM, Jim Lemon

Re: [R] barplot problem

2012-05-27 Thread Uwe Ligges
On 27.05.2012 17:46, jack hietpas wrote: Hi Jim- Thanks for your help. I am not sure how to execute your instructions... I used the space argument to to equally space the bars (barplot(data, space=c(1,1,1,1,1,1)). How do I get the x positions in the return values. Take care, xp -

Re: [R] How to remove square brackets, etc. from address strings?

2012-05-27 Thread Sabina Arndt
Hello r-help members, I'm very grateful for the reply which Sarah Goslee sent to me in such a prompt and helpful manner. It took me some time, but with a few amendments her suggestion now works not only for an example but for my entire data file as well: results [1] GERMANY

Re: [R] barplot problem

2012-05-27 Thread Richard M. Heiberger
I would use barchart in lattice. To get control of spacing you need to use the panel.barchart with the xyplot function. I show two options below. The first labels the distance scale with the default values seq(0,300,50), The second labels the bars with their distance value. tmp -

Re: [R] How to change width of bar when there are very few bars?

2012-05-27 Thread Manish Gupta
Thanks it works! How can i make horizontal bar graph using barp? barp(hmat,width = .1,col=2) http://r.789695.n4.nabble.com/file/n4631517/barp.png -- View this message in context: http://r.789695.n4.nabble.com/How-to-change-width-of-bar-when-there-are-very-few-bars-tp4631371p4631517.html Sent

Re: [R] How to remove square brackets, etc. from address strings?

2012-05-27 Thread Rui Barradas
Hello, Though I've not been following this thread, it seems like a regular expressions problem. In the code below, I've created a 'testdata' variable based on your post. # create a vector with two elements. x - [Engel, Kathrin M. Y.; Schroeck, ... etc ... y - gsub(Germany, Portugal, x)

[R] write.csv permissions

2012-05-27 Thread arun
Dear R help, I have a doubt regarding the write.csv function.  When I save a file (write.csv(res1,res1.csv)), it is saving with the read-only permission.  I tried to change the permission as a root user with chmod u+x.  Though, it says that -rwxr--r--  1 root root 164 2012-05-27 10:18

Re: [R] barplot problem

2012-05-27 Thread jack hietpas
Richard- thank you very very much, this is exactly what I needed. I have not previously used lattice graphics, I will have to experiment more with this package. Also thanks to everyone for your input. -jh On Sun, May 27, 2012 at 1:04 PM, Richard M. Heiberger r...@temple.eduwrote: I would use

Re: [R] SOS! R Console crashed after loading RODBC... Update: Re: How to set up RODBC? Diff between R Console and RStudio?

2012-05-27 Thread Michael
On Sun, May 27, 2012 at 11:32 AM, Michael comtech@gmail.com wrote: Help! The R Console very quietly closed and exited without giving any errors/warnings...after I loaded the RODBC library... Loading required package: RODBC On Sat, May 26, 2012 at 10:27 PM, Michael

Re: [R] SOS! R Console crashed after loading RODBC... Update: Re: How to set up RODBC? Diff between R Console and RStudio?

2012-05-27 Thread Prof Brian Ripley
He is multiple-posting: this was also posted on R-siq-db. Please do not answer here. The R-sig-db moderator On 27/05/2012 18:26, Michael wrote: On Sun, May 27, 2012 at 11:32 AM, Michaelcomtech@gmail.com wrote: Help! The R Console very quietly closed and exited without giving any

[R] How do I diagnosis what's wrong with R crash?

2012-05-27 Thread Michael
R Console closed and exited quietly after loading RODBC... I suspect that's segment fault crash... but how do I figure out what exactly is the problem? where can I find the core dump? Thanks a lot! (but this doesn't occur when I use R in RStudio...) [[alternative HTML version

Re: [R] Problem sourcing file

2012-05-27 Thread Reza Salimi-Khorshidi
Hi all, I have the exact same problem in R 2.14.0, which does not seem to be due to using the quotation mark. When I say source(~/Documents/myFile.R) for the first time (after I start R), it works fine, but when I run it for a second time (even when I empty the workspace and rerun every thing,

Re: [R] write.csv permissions

2012-05-27 Thread R. Michael Weylandt
Take a look at ?Sys.chmod -- I haven't used it myself, but it does seem to be what your looking for and, in particular, the default (777) seems to be what you want. Michael On Sun, May 27, 2012 at 10:36 AM, arun smartpink...@yahoo.com wrote: Dear R help, I have a doubt regarding the write.csv

Re: [R] Customized R Regression Output?

2012-05-27 Thread Bert Gunter
No. Your advice is incorrect. See below. On Sun, May 27, 2012 at 7:42 AM, Özgür Asar oa...@metu.edu.tr wrote: Your welcome, To extract R squared values, you can use summary(lm1)$r.squared and include it in the cbind as

Re: [R] Problem sourcing file

2012-05-27 Thread Duncan Murdoch
On 12-05-27 2:10 PM, Reza Salimi-Khorshidi wrote: Hi all, I have the exact same problem in R 2.14.0, which does not seem to be due to using the quotation mark. When I say source(~/Documents/myFile.R) for the first time (after I start R), it works fine, but when I run it for a second time (even

Re: [R] Query about creating time sequences

2012-05-27 Thread Shivam
Thanks for the effort Michael, but the problem here is that the dates for which the sequences need to be created have gaps in between. Basically I need the sequence for only those days on which the security market is open (I have the dates in a file which is present at the end of THIS mail). What

Re: [R] Customized R Regression Output?

2012-05-27 Thread Özgür Asar
Dear Bert Gunter, Doesn't the summary(lm1)$coef have a matrix form? Then, while working with columns of a matrix, can't one use c/rbind functions? But list seem to better for what Chris asked. Nonetheless, c does not. Best Ozgur - Ozgur ASAR Research

Re: [R] Problem sourcing file

2012-05-27 Thread Jeff Newmiller
The source function is quite convenient for invoking a set of R commands that have already been debugged. It is pretty worthless for troubleshooting. You need to step through those commands one at a time, then do it again, to see which command triggers this error. My response to the last

Re: [R] Problem sourcing file

2012-05-27 Thread Reza Salimi-Khorshidi
It is simply a bunch of web-scraping routines that if copied in the R command line (for more than 100s of times) works fine, BUT if capsulated in myFiles.R and invoked by source command, can ONLY be called once. So, seems weird and I can't figure out a solutions, as it's the first time I

Re: [R] write.csv permissions

2012-05-27 Thread Jeff Newmiller
It is bad practice to do ANYTHING in R as the root user, except possibly install libraries. This is true for any real work in any application in general... root is only for installing software or modifying the system configuration. The very fact that you are doing analysis in R and saving

Re: [R] Problem sourcing file

2012-05-27 Thread Reza Salimi-Khorshidi
Seems Duncan's solutions worked. I installed R 2.15.0 and it seems to work fine ... Thanks fellas. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Problem sourcing file

2012-05-27 Thread Duncan Murdoch
On 12-05-27 3:25 PM, Jeff Newmiller wrote: The source function is quite convenient for invoking a set of R commands that have already been debugged. It is pretty worthless for troubleshooting. You need to step through those commands one at a time, then do it again, to see which command

Re: [R] linux

2012-05-27 Thread Peter Langfelder
On Centos and most likely other RedHat/Fedora systems, gfortran is contained in the package gcc-gfortran. Install that package before trying to install R. HTH, Peter On Sun, May 27, 2012 at 8:43 AM, ya xinxi...@163.com wrote: Hi Rich, You mean, the R source code package contains the FORTRAN

Re: [R] Query about creating time sequences

2012-05-27 Thread Gabor Grothendieck
On Fri, May 25, 2012 at 1:14 PM, Shivam shivamsi...@gmail.com wrote: Hi All, I have a query about time based sequences. I know such questions have been asked a lot on forums, but I couldnt find the exact thing that I was looking for. I want to create a time-based sequence which will mimic

Re: [R] How to remove square brackets, etc. from address strings?

2012-05-27 Thread Sabina Arndt
Hello r-help members, thank you very much for your reply, Rui Barradas. Unfortunately, I'm not sure if I understand it correctly: I don't know how to create the vector's second element y that way. The pattern you used has to be extracted from the address strings first. This is more complex

Re: [R] Query about creating time sequences

2012-05-27 Thread Jeff Newmiller
Try this: # Setting TZ is optional, but I find it helps me to be more aware of # timezone effects Sys.setenv( TZ=Asia/Kolkata) library(lubridate) pdates - as.POSIXct( fdates ) hstart - new_period( hour=9, minute=15 ) hend - new_period( hour=15, minute=30 ) mperiod - new_period( minute=15 )

[R] CRAN (and crantastic) updates this week

2012-05-27 Thread Crantastic
CRAN (and crantastic) updates this week New packages * awsMethods (1.0-0) Maintainer: Joerg Polzehl Author(s): Joerg Polzehl polz...@wias-berlin.de License: GPL (= 2) http://crantastic.org/packages/awsMethods The package defines method extract that in needed in several

Re: [R] Query about creating time sequences

2012-05-27 Thread Shivam
Thanks for the responses ppl. @Gabor - The issue with your approach was that I had to select the time window for many days (124), which would be very difficult to achieve. I really appreciate you time though. @Jeff - Your solution works. I had to tweak it a little as I needed the sequence for

Re: [R] How to remove square brackets, etc. from address strings?

2012-05-27 Thread Rui Barradas
Hello, Em 27-05-2012 22:12, Sabina Arndt escreveu: Hello r-help members, thank you very much for your reply, Rui Barradas. Unfortunately, I'm not sure if I understand it correctly: I don't know how to create the vector's second element y that way. The pattern you used has to be extracted

Re: [R] Query about creating time sequences

2012-05-27 Thread Gabor Grothendieck
On Sun, May 27, 2012 at 7:03 PM, Shivam shivamsi...@gmail.com wrote: Thanks for the responses ppl. @Gabor - The issue with your approach was that I had to select the time window for many days (124), which would be very difficult to achieve. I really appreciate you time though. Why does the

Re: [R] Query about creating time sequences

2012-05-27 Thread Shivam
Its not the number of days per se, it is the random gaps between the dates (corresponding to the dates on which the security market was closed) which will be difficult to accommodate in the solution proposed by you. So I would have to remove the sequence corresponding to those days from the entire

Re: [R] File format for single channel analysis of Agilent microarray data in Limma?

2012-05-27 Thread Parisa
Yes, I did that in the end. Thanks, Parisa -- View this message in context: http://r.789695.n4.nabble.com/File-format-for-single-channel-analysis-of-Agilent-microarray-data-in-Limma-tp4631061p4631527.html Sent from the R help mailing list archive at Nabble.com.

[R] Problem with strptime

2012-05-27 Thread Des Callaghan
Hello Forum, I have a problem with the strptime function. With the 'data1' dataset below it works fine, but with the 'data2' dataset something goes wrong (see final line below). Both data1 and data2 are in exactly the same original format, the only difference is that they span different dates.

[R] Unable to fit model using “lrm.fit”

2012-05-27 Thread irena
Hi, I am running a logistic regression model using lrm library and I get the following error when I run the command: mod1 - lrm(death ~ factor(score), x=T, y=T, data = env1) Unable to fit model using “lrm.fit” where score is a numeric variable from 0 to 6. LRM executes fine for the following

Re: [R] Query about creating time sequences

2012-05-27 Thread Gabor Grothendieck
On Sun, May 27, 2012 at 8:01 PM, Shivam shivamsi...@gmail.com wrote: Its not the number of days per se, it is the random gaps between the dates (corresponding to the dates on which the security market was closed) which will be difficult to accommodate in the solution proposed by you. So I would

Re: [R] Customized R Regression Output?

2012-05-27 Thread Rui Barradas
Hello, Actually, Bert is right, c() seems better. Chris wants a table with one row per dataset and columns like he wrote in a previous post. Something like this could do it. # this was already posted x1 - 1:100 x2 - log(x1^2) y1 - x1 + x2 + rnorm(100) y2 -

Re: [R] write.csv permissions

2012-05-27 Thread arun
Thanks Jeff,Michael for your replies. A.K. - Original Message - From: Jeff Newmiller jdnew...@dcn.davis.ca.us To: arun smartpink...@yahoo.com; R help r-help@r-project.org Cc: Sent: Sunday, May 27, 2012 3:34 PM Subject: Re: [R] write.csv permissions It is bad practice to do ANYTHING

Re: [R] Query about creating time sequences

2012-05-27 Thread R. Michael Weylandt
Depending on your exchange of interest, you might also find some of the functions of the timeDate package helpful, e.g., holidayNYSE() -- it will miss the day the market was closed for extraordinary circumstances, but it seems to do a very good job. [Disclaimer: I haven't used it myself

Re: [R] Problem with strptime

2012-05-27 Thread R. Michael Weylandt
Dates and times are notoriously tricky to get right and the fact that the printed representation is so different from the internal (which is basically just a count of seconds) doesn't really help: to make this fully reproducible, could you supply us with the output of

Re: [R] Problem with strptime

2012-05-27 Thread Richard M. Heiberger
Some of your dates are displayed BST and some GMT. High probablilty your dates span the break between summer time and regular time when certain hours do not exist. (in the US we go from 0200 directly to 0301 in the spring when we move from standard time to daylight time). 0230 would therefore be

[R] Factanal fits

2012-05-27 Thread Hunsicker, Lawrence
Greetings, all: I am using factanal in R. When I enter a matrix or a formula, the print method winds up with something like this: Test of the hypothesis that 6 factors are sufficient. The chi square statistic is 28.1 on 22 degrees of freedom. The p-value is 0.172 But when I enter a covmat,

Re: [R] Unable to fit model using “lrm.fit”

2012-05-27 Thread Mitchell Maltenfort
When I have problems like that I try the same fit using 'glm' and see what I get. On Sun, May 27, 2012 at 1:53 PM, irena irena.be...@gmail.com wrote: Hi, I am running a logistic regression model using lrm library and I get the following error when I run the command: mod1 - lrm(death ~

[R] rpart space in column names

2012-05-27 Thread Raji
Hi, Our data has column names with spaces in that.The names in dataFrame are, *[1] Sepal Length Sepal Width Petal Length Petal Width Species * When i try to use the column names in rpart function, it gives the following error. * rp-rpart(as.factor(`Species`)~`Sepal Length`) Error in

Re: [R] Unable to fit model using “lrm.fit”

2012-05-27 Thread Rolf Turner
It is impossible for anyone to give you a useful answer without a ***self-contained reproducible*** example. BTW you are ***NOT*** using lrm library --- you are using the rms ***package***; lrm() is a function from that package. cheers, Rolf Turner On 28/05/12 05:53, irena wrote:

Re: [R] Factanal fits

2012-05-27 Thread R. Michael Weylandt
I'm not sure what you mean by the method is suppressed -- if it's not exported just use getAnywhere() to find it. Sorry I can't give a more detailed follow up -- not at my computer right now, Best, Michael On Sun, May 27, 2012 at 9:20 PM, Hunsicker, Lawrence lawrence-hunsic...@uiowa.edu wrote: