Re: [R] evaluate a string variable

2010-06-30 Thread Bill.Venables
You need to parse it before you evaluate it. eval(parse(text = avar)) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jeremiah H. Savage Sent: Wednesday, 30 June 2010 3:45 PM To: r-help@r-project.org Subject: [R] evaluate a

[R] Reading in a transcript-like file

2010-06-30 Thread ARRRRRR
http://r.789695.n4.nabble.com/file/n2272669/FT20100626_%2420_%2B_%242_Sit_%26_Go_-_%28169112900%29_-_Summary.txt FT20100626_%2420_%2B_%242_Sit_%26_Go_-_%28169112900%29_-_Summary.txt I have a lot of experience with Stata, but I'm new to R. I'm trying to read the attached file into R on my mac.

Re: [R] Reading in a transcript-like file

2010-06-30 Thread ARRRRRR
When I click the attachment here in the forum, it looks funny. When I open it in TextEdit, it looks like this: Full Tilt Poker Tournament Summary $20 + $2 Sit Go (169112900) Hold'em No Limit Buy-In: $20 + $2 Buy-In Chips: 1500 6 Entries Total Prize Pool: $120 Tournament started: 2010/06/27

Re: [R] process of stepwise selection

2010-06-30 Thread Stephan Kolassa
Hi Elaine, in general, stepwise selection is a very bad idea: Whittingham, M. J.; Stephens, P. A.; Bradbury, R. B. Freckleton, R. P. Why do we still use stepwise modelling in ecology and behaviour? Journal of Animal Ecology, 2006, 75, 1182-1189 HTH Stephan elaine kuo schrieb: Dear list,

Re: [R] Interpretation of gam intercept parameter

2010-06-30 Thread Gavin Simpson
On Tue, 2010-06-29 at 21:27 -0500, Lidia Dobria wrote: Dear All: I apologize for asking such an elementary question, but I could not find an adequate response on line. I am hoping to receive some help with the interpretation of the Intercept coefficient in the gam model below. I1

Re: [R] process of stepwise selection

2010-06-30 Thread Gavin Simpson
On Wed, 2010-06-30 at 09:13 +0200, Stephan Kolassa wrote: Hi Elaine, in general, stepwise selection is a very bad idea: Whittingham, M. J.; Stephens, P. A.; Bradbury, R. B. Freckleton, R. P. Why do we still use stepwise modelling in ecology and behaviour? Journal of Animal Ecology,

Re: [R] mathematical expression in varnames of lattice parallel plot

2010-06-30 Thread Deepayan Sarkar
On Mon, Jun 28, 2010 at 6:32 PM, Doris Brockmann brock...@supagro.inra.fr wrote: How can I insert mathematical expressions for variable names in a lattice parallel plot? I tried to implement mathematical expressions in varnames, however, without success. For example, neither

Re: [R] More than two font in a plot

2010-06-30 Thread Patrick Connolly
On Wed, 30-Jun-2010 at 11:06AM +1200, Paul Murrell wrote: Hi On 6/30/2010 2:17 AM, Jinsong Zhao wrote: Hi there, I am a Chinese R user. I hope to display Chinese character in a plot, and than save it in PostScript format. I have read the article titled Non-Standard Fonts in PostScript and

Re: [R] BBH2 and FrF2 packages

2010-06-30 Thread Andrea Bernasconi DG
Hi Dennis, Thank you for your answer. Are you sure that the following commands are working? library(FrF2) plan - FrF2(8, 3, factor.names=c(T,C,K), default.level=c(-,+), randomize = FALSE) y - c(60,72,54,68,52,83,45,80) plan - add.response(plan, y) MEPlot(plan) IAPlot(plan) I get the following

[R] List of zoo multivariate series

2010-06-30 Thread Research
Hi, I have a list which is basically a database of zoo multivariate objects: x.Date - as.Date(2003-02-01) + c(1:100) - 1 x - zoo(rnorm(100), x.Date) z - zoo(rnorm(100), x.Date) y - zoo(rnorm(100), x.Date) k - zoo(rnorm(100), x.Date) a-merge(x,z) b-merge(y,k)

[R] vlmc - In vlmc(traffic.clusters.stationary, cutoff = i) : alphabet with 1-letter strings; trying to abbreviate

2010-06-30 Thread Constantinos Antoniou
Dear all (copying the package author), I have a question on the vlmc package. I am trying to model a time series, where each element can take one of 11 values (the result of some clustering). When I run the following command (synthetic data to facilitate self-contained example) I get the

[R] Sweave PDF files show plot symbols as q

2010-06-30 Thread Allan Engelhardt
I'm guessing this is a FAQ but I can't find it and that it is probably not exclusive R related but relevant so I thought I'd ask: When I view the PDF output from Sweave (e.g. Example 1 from the author's web site at [1]) on a Linux system using the standard PDF viewer [2], the circles for the

Re: [R] More than two font in a plot

2010-06-30 Thread baptiste auguie
Hi, Another option would be the tikzDevice package, which lets you process all the text of your plot with LaTeX. I think the XeTeX variant might be the most straight-forward to mix different fonts using this approach. HTH, baptiste On 29 June 2010 16:17, Jinsong Zhao jsz...@mail.hzau.edu.cn

Re: [R] List of zoo multivariate series

2010-06-30 Thread Allan Engelhardt
help([[) e.g. plot(test[[2]]) Hope this helps Allan On 30/06/10 10:09, Research wrote: Hi, I have a list which is basically a database of zoo multivariate objects: x.Date - as.Date(2003-02-01) + c(1:100) - 1 x - zoo(rnorm(100), x.Date) z - zoo(rnorm(100), x.Date) y -

Re: [R] Logistic regression with multiple imputation

2010-06-30 Thread Chuck Cleland
On 6/30/2010 1:14 AM, Daniel Chen wrote: Hi, I am a long time SPSS user but new to R, so please bear with me if my questions seem to be too basic for you guys. I am trying to figure out how to analyze survey data using logistic regression with multiple imputation. I have a survey data

[R] Assigning entries to categories

2010-06-30 Thread LogLord
Hi, I have the following problem: I have a large dataframe where each row is specified by two numerical value (one 1:25 and the other one large specific number (e.g. 203043)). I have a list of 60 categories which are also assigned to one of the first numerical value (1:25) but have a range for

[R] plot focus

2010-06-30 Thread pdb
I am doing calculations in a loop and then plotting the results by adding a point to each of 2 charts at the end of the loop. Its very informative as you can see the progression through time. My problem is, if I have 2 plots, I don't know how to get the focus back to the first plot.

Re: [R] Sweave PDF files show plot symbols as q

2010-06-30 Thread Gavin Simpson
On Wed, 2010-06-30 at 10:19 +0100, Allan Engelhardt wrote: I'm guessing this is a FAQ but I can't find it and that it is probably not exclusive R related but relevant so I thought I'd ask: When I view the PDF output from Sweave (e.g. Example 1 from the author's web site at [1]) on a Linux

[R] The R Journal, Vol.2 Issue 1

2010-06-30 Thread Peter Dalgaard
The first issue of the second volume of The R Journal will shortly be available at jour...@r-project.org/current.html. Thanks to everyone involved. Peter Dalgaard Editor-in-chief -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd@cbs.dk

Re: [R] Multiline and grouping in R

2010-06-30 Thread Jim Lemon
On 06/30/2010 10:42 AM, Pablo Cerdeira wrote: Hi All, this is my first mail here. I'm trying to plot a multiline chart grouping values with no success. I have read a lot in the official Wiki and also searched via Google, but I did not find anything. I'm importing some data from a cvs file.

[R] Assigning entries to category

2010-06-30 Thread LogLord
Hi, I have the following problem: I have a large dataframe where each row is specified by two numerical value (one 1:25 and the other one large specific number (e.g. 203043)). I have a list of 60 categories which are also assigned to one of the first numerical value (1:25) but have a range for

Re: [R] Multiline and grouping in R

2010-06-30 Thread ONKELINX, Thierry
Or you could use ggplot2 library(ggplot2) Dataset - read.csv(file.csv, header=TRUE) ggplot(Dataset, aes(x = YEAR, y = CASES, colour = AREA)) + geom_line() HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en

Re: [R] Sweave PDF files show plot symbols as q

2010-06-30 Thread Allan Engelhardt
Thank you Gavin, this is useful. The work-around for me then is to quickly run pdf(test.pdf) plot(0:25, pch=0:25) dev.off() to see which pch values are not safe (unsafe.pch - c(1, 10, 13, 16, 19, 20, 21)) and make sure I never use them. (The first four, btw., corresponds to the symbols

Re: [R] Sweave PDF files show plot symbols as q

2010-06-30 Thread Allan Engelhardt
A simpler option is probably to put echo=FALSE= pdf.options(useDingbats = FALSE) @ near the top of the Sweave document. Thanks again! Thank you Gavin, this is useful. The work-around for me then is to quickly run pdf(test.pdf) plot(0:25, pch=0:25) dev.off() to see which pch values are

Re: [R] Logistic regression with multiple imputation

2010-06-30 Thread Frank E Harrell Jr
There are titanic datasets in R binary format at http://biostat.mc.vanderbilt.edu/DataSets Note that the aregImpute function in the Hmisc package streamlines many of the steps, in conjunction with the fit.mult.impute function. Frank On 06/30/2010 05:02 AM, Chuck Cleland wrote: On

Re: [R] Logistic regression with multiple imputation

2010-06-30 Thread Rafael Björk
In addition to the tips above, you may want to chek out: http://www.stat.columbia.edu/~gelman/arm/missing.pdf 2010/6/30 Chuck Cleland cclel...@optonline.net On 6/30/2010 1:14 AM, Daniel Chen wrote: Hi, I am a long time SPSS user but new to R, so please bear with me if my questions seem

Re: [R] Logistic regression with multiple imputation

2010-06-30 Thread David Winsemius
On Jun 30, 2010, at 1:14 AM, Daniel Chen wrote: Hi, I am a long time SPSS user but new to R, so please bear with me if my questions seem to be too basic for you guys. I am trying to figure out how to analyze survey data using logistic regression with multiple imputation. I have a survey

Re: [R] plot focus

2010-06-30 Thread Peter Ehlers
You could just open two devices. See ?dev.cur for an example. -Peter Ehlers On 2010-06-30 4:26, pdb wrote: I am doing calculations in a loop and then plotting the results by adding a point to each of 2 charts at the end of the loop. Its very informative as you can see the progression

Re: [R] vlmc - In vlmc(traffic.clusters.stationary, cutoff = i) : alphabet with 1-letter strings; trying to abbreviate

2010-06-30 Thread Martin Maechler
CA == Constantinos Antoniou constantinos.antoniou.rli...@gmail.com on Wed, 30 Jun 2010 12:07:16 +0300 writes: CA == Constantinos Antoniou constantinos.antoniou.rli...@gmail.com on Wed, 30 Jun 2010 12:07:16 +0300 writes: CA Dear all (copying the package author), CA I have a

Re: [R] Sweave PDF files show plot symbols as q

2010-06-30 Thread Gavin Simpson
On Wed, 2010-06-30 at 13:26 +0100, Allan Engelhardt wrote: A simpler option is probably to put echo=FALSE= pdf.options(useDingbats = FALSE) @ Hi Allan, You're on Linux, so is there a reason why this won't work in a shell: touch ~/.fonts.conf vim ~/.fonts.conf replace vim with your

Re: [R] Reading in a transcript-like file

2010-06-30 Thread David Winsemius
On Jun 30, 2010, at 12:21 AM, ARR wrote: http://r.789695.n4.nabble.com/file/n2272669/FT20100626_%2420_%2B_%242_Sit_%26_Go_-_%28169112900%29_-_Summary.txt FT20100626_%2420_%2B_%242_Sit_%26_Go_-_%28169112900%29_-_Summary.txt I have a lot of experience with Stata, but I'm new to R. I'm

[R] merge.zoo and fill

2010-06-30 Thread Research
Hello again, I merge different zoo time series with prices at different dates. This returns a multivariate zoo object with NA's at various points i.e., 2010-02-28 NA NA NA NA 850.2 2444.4 NA NA NA NA NA NA NA 2010-03-01 61.1 55.3

[R] Why the variation when creating .pdf file output for my plots?

2010-06-30 Thread Karl Brand
Esteemed R Users, Would some one be patient enough to explain the variation i see when creating .pdf file output for my plots? FYI- my goal is produce the highest quality .pdf output from the R 'command line' as opposed to using the menu of the acitve graphics window. Im using 32bit WinXP.

[R] Solution to differential equation for nls function

2010-06-30 Thread mahesh samtani
Hello, I am trying to find the analytical solution to this differential equation dR/dt = k1*R (1-(R/Rmax)^k2); R(0) = Ro k1, k2, and Rmax are parameters that need to fitted, while Ro is the baseline value (which can be fitted or fixed). The response (R) increases initially at an exponential rate

Re: [R] plot focus

2010-06-30 Thread Tal Galili
Good question pdb, I would suggest you to use: par(bg = white) In the beginning of the code, But it doesn't solve the general problem of how to get the lines to be properly aligned. I am curious for the answer from betteR people. Best, Tal Contact

[R] What is wrong with this code?

2010-06-30 Thread Cable, Samuel B Civ USAF AFMC AFRL/RVBXI
Here it is: read.inputs-function(infile) { for (counter in 1:length(input.list)) { seek(infile,where=0,origin='start') newline-readLines(infile,n=1) while(length(newline)0) { if(!is.na(grep(as.character(input.list[[counter]][1]),newline)[1])) { break }

[R] run R

2010-06-30 Thread jorge . conrado
Hi, I'm starting use the R Package and I have some .R scripts. How can I run these .R scripts. Conrado __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] backslash escape characters in JSON strings

2010-06-30 Thread dabd
Hi, I am trying to consume a web service that returns a JSON string, however, when I run fromJSON(s) Error: '\/' is an unrecognized escape in character string starting http:\/ because the string s contains a single backslash, which is the JSON escape character, but R expects 2 backslashes, I

[R] All possible permutations of letter A with other letters

2010-06-30 Thread Yen Ngo
Dear list, I have a vector of letter strings as follow: LETTERS[c(1:7,9,15,18:25)]  [1] A B C D E F G I O R S T U V W X Y   I need to find sequences of length 11, which are made from  all possible permutations with repetition (not the unique ones) of the letter string A with the other

Re: [R] More than two font in a plot

2010-06-30 Thread Jinsong Zhao
On 2010-6-30 17:20, baptiste auguie wrote: Hi, Another option would be the tikzDevice package, which lets you process all the text of your plot with LaTeX. I think the XeTeX variant might be the most straight-forward to mix different fonts using this approach. HTH, baptiste Thank you

Re: [R] More than two font in a plot

2010-06-30 Thread Jinsong Zhao
On 2010-6-30 7:06, Paul Murrell wrote: Hi On 6/30/2010 2:17 AM, Jinsong Zhao wrote: Hi there, I am a Chinese R user. I hope to display Chinese character in a plot, and than save it in PostScript format. I have read the article titled Non-Standard Fonts in PostScript and PDF Graphics,

Re: [R] More than two font in a plot

2010-06-30 Thread Jinsong Zhao
On 2010-6-30 16:24, Patrick Connolly wrote: On Wed, 30-Jun-2010 at 11:06AM +1200, Paul Murrell wrote: Hi On 6/30/2010 2:17 AM, Jinsong Zhao wrote: Hi there, I am a Chinese R user. I hope to display Chinese character in a plot, and than save it in PostScript format. I have read the article

Re: [R] What is wrong with this code?

2010-06-30 Thread Erik Iverson
Could you please provide a small reproducible example of the input you have and output you'd like, as the posting guide asks for? There most likely is much simplified way to do what you want, avoiding for loops and therefore `break` altogether. Cable, Samuel B Civ USAF AFMC AFRL/RVBXI wrote:

[R] help on naivebayes function in R

2010-06-30 Thread Aadhithya
Hi, I have written a code in R for classifying microarray data using naive bayes, the code is given below: library(e1071) train-read.table(Z:/Documents/train.txt,header=T); test-read.table(Z:/Documents/test.txt,header=T); cl - c(c(rep(ALL,10), rep(AML,10))); cl - factor(cl) model -

[R] Threshold Cointegration test

2010-06-30 Thread Setlhare Lekgatlhamang
Dear R Users (particularly tsDyn package users), I am very new in the use of R and the contributed packages in need of urgent assistance (see attachment for the explanation of the problem). Could someone assist me on conducting threshold cointegration test in R using the tsDyn package. I have

Re: [R] Why the variation when creating .pdf file output for my plots?

2010-06-30 Thread Erik Iverson
Method 3: pdf(file=my_plot.pdf, paper=a4) dev.off() The `pdf` function opens a *new* graphics device, you then send output to the device before calling dev.off(), e.g., pdf(file = my_plot.pdf) plot(1:10, 1:10) dev.off() -yields a .pdf file of 1kb (same plot example) and returns

Re: [R] backslash escape characters in JSON strings

2010-06-30 Thread Erik Iverson
You don't say what package fromJSON is in, or give us the ability to reproduce the error, since we don't know what 's' is. If those two pieces of information are possible to give to the list, it will be much easier to help. dabd wrote: Hi, I am trying to consume a web service that returns

Re: [R] run R

2010-06-30 Thread Joris Meys
Welcome to a new world. You're using the _programming language_ R with thousands of packages, and first of all you should be reading the introduction material thoroughly : http://cran.r-project.org/doc/manuals/R-intro.pdf http://cran.r-project.org/doc/contrib/Owen-TheRGuide.pdf Regarding your

Re: [R] run R

2010-06-30 Thread David Winsemius
On Jun 30, 2010, at 9:08 AM, jorge.conr...@cptec.inpe.br wrote: Hi, I'm starting use the R Package and I have some .R scripts. How can I run these .R scripts. ?source ... and re-read Introduction to R. Conrado __

Re: [R] run R

2010-06-30 Thread Erik Iverson
Please follow the posting guide and tell us minimally what your operating system is. You might find: http://cran.r-project.org/doc/manuals/R-intro.html#Scripting-with-R or http://code.google.com/p/batchfiles/#PROGRAM_LIST useful. jorge.conr...@cptec.inpe.br wrote: Hi, I'm

Re: [R] Threshold Cointegration test

2010-06-30 Thread David Winsemius
Read the Posting Guide. Your attachment apparently did not meet the requirements therein. On Jun 30, 2010, at 10:52 AM, Setlhare Lekgatlhamang wrote: Dear R Users (particularly tsDyn package users), I am very new in the use of R and the contributed packages in need of urgent assistance

Re: [R] Solution to differential equation for nls function

2010-06-30 Thread Ravi Varadhan
Yes, there is an analytical solution. Here is how you do it: bernoulli_anal - function(t, R0, Rmax, a, b) { # Note: a, b, R0, Rmax all have to be positive (strictly 0) R1 - R0 / Rmax k - R1^b / (1 - R1^b) R - Rmax / (1 + exp(-a*b*t)/k)^(1/b) return(R) } R0 - 1 Rmax - 2 a - 0.5 b - 1.0 t -

Re: [R] All possible permutations of letter A with other letters

2010-06-30 Thread Barry Rowlingson
On Wed, Jun 30, 2010 at 11:57 AM, Yen Ngo yen.ng...@yahoo.se wrote: Dear list, I have a vector of letter strings as follow: LETTERS[c(1:7,9,15,18:25)]  [1] A B C D E F G I O R S T U V W X Y I need to find sequences of length 11, which are made from  all possible permutations with

Re: [R] help on naivebayes function in R

2010-06-30 Thread Max Kuhn
So... You really should give the results of sessionInfo(). There are (at least) two naive Bayes functions. I'm assuming that you are using the one in klaR. Look at the manual page ? predict.NaiveBayes: the output is A list with the conditional a-posterior probabilities for each class and the

Re: [R] All possible permutations of letter A with other letters

2010-06-30 Thread Ted Harding
On 30-Jun-10 15:48:39, Barry Rowlingson wrote: On Wed, Jun 30, 2010 at 11:57 AM, Yen Ngo yen.ng...@yahoo.se wrote: Dear list, I have a vector of letter strings as follow: LETTERS[c(1:7,9,15,18:25)] _[1] A B C D E F G I O R S T U V W X Y I need to find sequences of length 11, which are

Re: [R] Assigning entries to category

2010-06-30 Thread Charles C. Berry
see ?cut ?interaction HTH, Chuck On Wed, 30 Jun 2010, LogLord wrote: Hi, I have the following problem: I have a large dataframe where each row is specified by two numerical value (one 1:25 and the other one large specific number (e.g. 203043)). I have a list of 60

Re: [R] Why the variation when creating .pdf file output for my plots?

2010-06-30 Thread Karl Brand
Thank you Erik! That works nicely now. The file size in (in kilobytes) is equal to the FileSave AsPDF method. Still curious why the file sizes (in Kb), differ by a factor of ~2 between the two methods: pdf() dev2bitmap(method = pdf) I'm just *assuming* here that file size is inidcative of

Re: [R] Assigning entries to category

2010-06-30 Thread David Winsemius
On Jun 30, 2010, at 12:27 PM, Charles C. Berry wrote: see ?cut ?interaction I had been thinking that findInterval or expand.grid might also be useful, but was really waiting for a test data preparation to emerge. -- David. HTH, Chuck On Wed, 30 Jun 2010, LogLord

Re: [R] plot focus

2010-06-30 Thread Peter Ehlers
On 2010-06-30 8:38, Tal Galili wrote: Good question pdb, I would suggest you to use: par(bg = white) In the beginning of the code, But it doesn't solve the general problem of how to get the lines to be properly aligned. I am curious for the answer from betteR people. Best, Tal Instead of

Re: [R] Why software fails in scientific research

2010-06-30 Thread Dr. David Kirkby
On 03/ 1/10 12:23 AM, Sharpie wrote: John Maindonald wrote: I came across this notice of an upcoming webinar. The issues identified in the first paragraph below seem to me exactly those that the R project is designed to address. The claim that most research software is barely fit for

Re: [R] Why software fails in scientific research

2010-06-30 Thread Bert Gunter
Just one small additional note below ... Bert Gunter Genentech Nonclinical Biostatistics But a lot of academics are not going to waste their time documenting code properly, so others can reap the benefits of it. They would rather get on with the next project, to get the next paper. --

Re: [R] merge.zoo and fill

2010-06-30 Thread Gabor Grothendieck
On Wed, Jun 30, 2010 at 10:05 AM, Research risk2...@ath.forthnet.gr wrote: Hello again, I merge different zoo time series with prices at different dates. This returns a multivariate zoo object with NA's at various points i.e., 2010-02-28     NA     NA      NA       NA   850.2  2444.4     NA  

[R] Finding Lower Envelope of Points on a Plot?

2010-06-30 Thread Asha Sharma
Hi, I am looking for a way to find the lower envelope of points on a plot, preferably specifying what percentage of points should be allowed to lie outside the envelope. There must be a straightforward way to do this, but I do not seem to be able to find it. I would greatly appreciate any

Re: [R] Correctly plotting bar and scatter chart on 2-y axis plot with par(new=T)

2010-06-30 Thread dan.weavesham
Greg, Just a quick one to say thanks for helping me out with my 2-y axis query -- your solution works a treat. However, 2 extension points I was wondering if you could help with: - 1/ Is there any way to invert the 2nd y axis -- i.e. highest entry at the bottom of the axis? I can see that

[R] ggplot qplot bar removing bars when truncating scale

2010-06-30 Thread ml692787
I'm having problems with this example, it is posted with reproduceable code below, both with the normal 0-6 scale and the desired 3-6 scale (with bars removed). How can I get the graph to have the desired 3-6 scale without removing the bars. Thanks! #Data

[R] how to tabulate the prediction value using table function for naive baiyes in R

2010-06-30 Thread Aadhithya
Hi, I have written a code in R for classifying microarray data using naive bayes, the code is given below: library(e1071) train-read.table(Z:/Documents/train.txt,header=T); test-read.table(Z:/Documents/test.txt,header=T); cl - c(c(rep(ALL,10), rep(AML,10))); cl - factor(cl) model -

[R] string question

2010-06-30 Thread Paul Evans
Hi, How can I get double quotes embedded in the string? Example: -- str1 - 'xyz' ## desired output # abcxyz qr2 - paste('abc',str1,sep='') print(qr2) - Actual output: [1] abc\str\ I also tried putting an escape sequence before the quote, but couldn't get the

[R] parameterization of glm nested design

2010-06-30 Thread Huso, Manuela
Dear R community, I am new to R, a reforming SAS user :) I am running R 2.10.1 on a Windows XP machine. I would like to write linear functions of my coefficient parameter estimates from a glm, but am having a difficult time understanding the parameterization R uses. In the toy example

Re: [R] Correctly plotting bar and scatter chart on 2-y axis plot with par(new=T)

2010-06-30 Thread dan.weavesham
Jim, Thanks for the reply and your help on this. In short, it's close but not quite there. In the plot you've produced, I'm looking to get the trinagular points plotted over the top of the bar chart. Does that make sense? Just so you know, there are 2 other considerations: - 1/ ideally, I'd

Re: [R] backslash escape characters in JSON strings

2010-06-30 Thread Dário Abdulrehman
Hi Erik, The reported problem is with the rjson package. Then I tried with RJSONIO, which worked fine and aparently is faster. Thanks. On Wed, Jun 30, 2010 at 4:05 PM, Erik Iverson er...@ccbr.umn.edu wrote: You don't say what package fromJSON is in, or give us the ability to reproduce the

Re: [R] string question

2010-06-30 Thread Phil Spector
Paul - When you print a string, it escapes the quotes with a backslash. That's a property of the print() function, not the string itself. If you want to see the string, use cat(). The nchar() function is also useful: str1 - 'xyz' qr2 - paste('abc',str1,sep='') print(qr2) [1] abc\xyz\

[R] Help installing R commander in Fedora 13...

2010-06-30 Thread Carlo Tambuatco
I did a standard install of R on Fedora 13 using yum as root, which I assumed installed both the base packages and the devel packages needed to install R Commander (there weren't any optional packages listed on the yum info page). My version of R is updated to the latest 2.11 version. But,

Re: [R] Finding Lower Envelope of Points on a Plot?

2010-06-30 Thread David Winsemius
On Jun 30, 2010, at 2:05 PM, Asha Sharma wrote: Hi, I am looking for a way to find the lower envelope of points on a plot, preferably specifying what percentage of points should be allowed to lie outside the envelope. There must be a straightforward way to do this, but I do not seem to

Re: [R] What is wrong with this code?

2010-06-30 Thread Cable, Samuel B Civ USAF AFMC AFRL/RVBXI
OK, let me wipe the egg off of my face The problem wasn't with the break statement, it was with how I had included my functions in the input.list list. I promise, I pounded on this for hours and saw the problem five minutes after I sent off the e-mail. Anybody else ever have this happen?

Re: [R] how to tabulate the prediction value using table function for naive baiyes in R

2010-06-30 Thread Steve Lianoglou
Hi, On Wed, Jun 30, 2010 at 11:44 AM, Aadhithya sistaa...@gmail.com wrote: Hi, I have written a code in R for classifying microarray data using naive bayes, the code is given below: library(e1071) train-read.table(Z:/Documents/train.txt,header=T);

[R] problem with rbind on data.frames that contain data.frames

2010-06-30 Thread Michael Lachmann
It took me some time to find this bug in my code. Is this a feature of R? Am I doing something wrong? a=data.frame(x=1:10,y=1:10) b=data.frame(x=11:20,y=11:20) z=data.frame(1:10,11:20) a$z=z b$z=z rbind(a,b) Error in `row.names-.data.frame`(`*tmp*`, value = c(1, 2, 3, 4, :

Re: [R] Finding Lower Envelope of Points on a Plot?

2010-06-30 Thread Stephan Kolassa
Hi, one possibility would be to calculate the convex hull using chull(). I believe that the hull points are returned by chull() in a clockwise order (?), so the points between the rightmost and the leftmost point in the chull() result are the lower half of the convex hull. Remove these

Re: [R] Help installing R commander in Fedora 13...

2010-06-30 Thread Allan Engelhardt
There is a Fedora mailing list for R which might be better, but some suggestions: On 30/06/10 20:18, Carlo Tambuatco wrote: I did a standard install of R on Fedora 13 using yum as root, which I assumed installed both the base packages and the devel packages needed If you want the developer

Re: [R] ggplot qplot bar removing bars when truncating scale

2010-06-30 Thread Jonathan Christensen
Matthew, The ggplot documentation pages (http://had.co.nz/ggplot2) have the following to say under geom_bar: A bar chart maps the height of the bar to a variable, and so the base of the bar must always been shown to produce a valid visual comparison. Thus, I suspect what you are trying to do

Re: [R] What is wrong with this code?

2010-06-30 Thread John Kane
--- On Wed, 6/30/10, Cable, Samuel B Civ USAF AFMC AFRL/RVBXI samuel.ca...@hanscom.af.mil wrote: From: Cable, Samuel B Civ USAF AFMC AFRL/RVBXI samuel.ca...@hanscom.af.mil Subject: Re: [R] What is wrong with this code? To: r-help@r-project.org Received: Wednesday, June 30, 2010, 3:41 PM

Re: [R] Why the variation when creating .pdf file output for my plots?

2010-06-30 Thread Jonathan Christensen
Karl, dev2bitmap runs its output through Ghostscript, and I assume that the difference is somehow due to that. I can't say whether Ghostscript is decreasing the file quality or just doing something clever, though. Jonathan On Wed, Jun 30, 2010 at 10:30 AM, Karl Brand k.br...@erasmusmc.nl

Re: [R] Finding Lower Envelope of Points on a Plot?

2010-06-30 Thread Stephan Kolassa
Hi, To be honest, what you mean by a (linear) lower envelope becomes less and less clear to me. Take any cloud of 2-d points. The convex hull consists of a number of these points - or alternatively, of a number of line segments between successive ones of these points. Thus, every one of

Re: [R] What is wrong with this code?

2010-06-30 Thread Cable, Samuel B Civ USAF AFMC AFRL/RVBXI
Anyway, I still wouldn't mind some advice on character matching. Thanks. If so we need a reproducible example of what you are doing. OK, let's say I have three strings. Str1=abc. Str2=abcd. Str3=efgh. I want to compare Str1 and Str2 in such a way that R detects that Str2 indeed

Re: [R] What is wrong with this code?

2010-06-30 Thread Erik Iverson
Cable, Samuel B Civ USAF AFMC AFRL/RVBXI wrote: Anyway, I still wouldn't mind some advice on character matching. Thanks. If so we need a reproducible example of what you are doing. OK, let's say I have three strings. Str1=abc. Str2=abcd. Str3=efgh. I want to compare Str1 and Str2 in

Re: [R] What is wrong with this code?

2010-06-30 Thread Henrique Dallazuanna
Try this: lapply(list(Str2, Str3), grepl, pattern = Str1) On Wed, Jun 30, 2010 at 5:22 PM, Cable, Samuel B Civ USAF AFMC AFRL/RVBXI samuel.ca...@hanscom.af.mil wrote: Anyway, I still wouldn't mind some advice on character matching. Thanks. If so we need a reproducible example

[R] Embed function strips out date index

2010-06-30 Thread Manussawee Sukunta
Hi, I'm having especially hard time today and couldn't find any clue/answer through the internet.  I hope you can help. I'm in a process of writing a script to estimate error correction model, and I was following an example in Bernhard Pfaff's Analysis of Integrated and Cointegrated Time Series

[R] longitudinal tobit regression in R

2010-06-30 Thread Biau David
Hi, I am trying to model a score over time. This score shows a ceiling effect. I was willing to use a longitudinal tobit model, such as the one described by Twisk et al. (Twisk_Longitudinal tobit regression: A new approach to analyze outcome variables with floor or ceiling effects_JCE_2009)

Re: [R] What is wrong with this code?

2010-06-30 Thread John Kane
Okay, here is a reproducible example of a possible solution (actually it probably does not do what you want but it's a start for discussion. Note it is actual code and data which is what is needed. === str1 - abc str2 - abcd str3 - efgh

Re: [R] The R Journal, Vol.2 Issue 1

2010-06-30 Thread Peter Dalgaard
Peter Dalgaard wrote: The first issue of the second volume of The R Journal will shortly be available at jour...@r-project.org/current.html. Thanks to everyone As no less than 16 people has informed me, that of course wants to be http://journal.r-project.org/current.html (That's what you get

Re: [R] What is wrong with this code?

2010-06-30 Thread Peter Ehlers
On 2010-06-30 14:28, Erik Iverson wrote: Cable, Samuel B Civ USAF AFMC AFRL/RVBXI wrote: Anyway, I still wouldn't mind some advice on character matching. Thanks. If so we need a reproducible example of what you are doing. OK, let's say I have three strings. Str1=abc. Str2=abcd.

Re: [R] merging/intersecting 2 data frames

2010-06-30 Thread John Kane
Have you changed the values in b.df? My reading of the original b.df in Erin's post was that there were no common values in PATIENT_ID and ID. --- On Tue, 6/29/10, jim holtman jholt...@gmail.com wrote: From: jim holtman jholt...@gmail.com Subject: Re: [R] merging/intersecting 2 data frames

Re: [R] vlmc - In vlmc(traffic.clusters.stationary, cutoff = i) : alphabet with 1-letter strings; trying to abbreviate

2010-06-30 Thread Constantinos Antoniou
Dear Martin, Thank you very much for the (reassuring and helpful) response. Best regards, Costas On Jun 30, 2010, at 3:58 PM, Martin Maechler wrote: CA == Constantinos Antoniou constantinos.antoniou.rli...@gmail.com on Wed, 30 Jun 2010 12:07:16 +0300 writes: CA == Constantinos Antoniou

[R] merging and adding time series

2010-06-30 Thread skan
Hello I have two series (that can have with different frequencies or with missing values). I merge them and use na.locf, getting a zoo objet with a common index and two core columns. How can I add this columns getting a new zoo series? Any other way of adding two asynchronou series? regards

[R] Help installing R commander in Fedora 13...

2010-06-30 Thread piscesboy
I did a standard install of R on Fedora 13 using yum as root, which I assumed installed both the base packages and the devel packages needed to install R Commander (there weren't any optional packages listed on the yum info page). My version of R is updated to the latest 2.11 version. But,

Re: [R] Finding Lower Envelope of Points on a Plot?

2010-06-30 Thread Asha Sharma
Hi, Thanks to both of you for taking the time to answer my question. I was maybe not very clear in the way I framed my question. By plot, I meant an x-y plot with a cloud of points which should have a linear lower envelope. Is there a way to both plot as well as get the parameters of the

Re: [R] merging and adding time series

2010-06-30 Thread skan
If I just add them (without merging) I get only the common elements. rowsum doesn't work for me -- View this message in context: http://r.789695.n4.nabble.com/merging-and-adding-time-series-tp2274125p2274131.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Embed function strips out date index

2010-06-30 Thread Jonathan Christensen
Manussawee, What type of object is series? We could help you better if we could reproduce exactly what you are trying to do, which requires more information (you made a good start by including data and code, though). The output of diff is a vector (time series, ...) with length one less than the

Re: [R] problem with rbind on data.frames that contain data.frames

2010-06-30 Thread Allan Engelhardt
On 30/06/10 20:46, Michael Lachmann wrote: It took me some time to find this bug in my code. Is this a feature of R? Am I doing something wrong? a=data.frame(x=1:10,y=1:10) b=data.frame(x=11:20,y=11:20) z=data.frame(1:10,11:20) a$z=z You are (kind of) assigning *two* columns from the data

Re: [R] What is wrong with this code?

2010-06-30 Thread Stephan Kolassa
Hi, your problem is called string matching. Search for that term on rseek.org, there are a couple of functions and packages. And Wikipedia can tell you everything you ever wanted to know about string matching (and more). HTH, Stephan Cable, Samuel B Civ USAF AFMC AFRL/RVBXI schrieb:

Re: [R] Finding Lower Envelope of Points on a Plot?

2010-06-30 Thread David Winsemius
On Jun 30, 2010, at 4:02 PM, Asha Sharma wrote: Hi, Thanks to both of you for taking the time to answer my question. I was maybe not very clear in the way I framed my question. By plot, I meant an x-y plot with a cloud of points which should have a linear lower envelope. Is there a way

  1   2   >