[R] fancyRpartPlot and the title at the bottom of the plot....

2014-01-06 Thread Levent TERLEMEZ
Dear Users, Is there way to avoid the useless title (Rattle, date-time and user imformation) at the bottom of the fancyRpartPlot. We already referencing it why should it be there? Thanks, Levent. [[alternative HTML version deleted]] __

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-06 Thread zhu yao
Thanks Michael. I have read the original article and I guess whether the following formula could resolve my question? *for adjusted HR of each BMI category,* fit-coxph(Surv~factor(BMI-category)+..+covariates) *for trend, * fit-coxph(Surv~as.numeric(BMI-category)+..+covariates) *# p trend may be

[R] Reversing the Equation to find value of variable

2014-01-06 Thread Katherine Gobin
Dear R forum I have following variables - EAD = 1 LGD = 0.45 PD = 0.47 M = 3 # Equation 1 R = 0.12*(1-exp(-50*PD))/(1-exp(-50)) + 0.24*(1-(1-exp(-50*PD))/(1-exp(-50))) b = (0.11852 - 0.05478 * log(PD))^2 K = (LGD * pnorm((1 - R)^(-0.5) * qnorm(PD) + (R / (1 - R))^0.5 * qnorm(0.999)) -

Re: [R] Reversing the Equation to find value of variable

2014-01-06 Thread Berend Hasselman
On 06-01-2014, at 12:41, Katherine Gobin katherine_go...@yahoo.com wrote: Dear R forum I have following variables - EAD = 1 LGD = 0.45 PD = 0.47 M = 3 # Equation 1 R = 0.12*(1-exp(-50*PD))/(1-exp(-50)) + 0.24*(1-(1-exp(-50*PD))/(1-exp(-50))) b = (0.11852 - 0.05478 *

[R] replace to NA.

2014-01-06 Thread vikram ranga
Dear All, I am bit stuck to a problem of replacing to NA. I have big data set but here is the toy example:- test-data.frame( test1=c(,Hi,Hello), test2=c(Hi,,Bye), test3=c(Hello,,)) If the data as in above, I could change all to NA by this code:- for(i in 1:3){ for(j in 1:3){ if(test[j,i]==){

[R] R compatible with Office 2013

2014-01-06 Thread Sarah King
Hi I tried to install R on my laptop which has Office 2013 on it. The download didn't work, is this because R is not compatible with Office 2013? Thanks Sarah Notice of Confidentiality This transmission contains information that may be confidential and that may also be privileged. Unless

Re: [R] help

2014-01-06 Thread javad bayat
Dear Saha thank you to reminding me. Here is the text file. On Mon, Jan 6, 2014 at 10:33 AM, Koushik Saha saha.koushik2...@gmail.comwrote: please don't send images . paste your data in a text file with .text extension and attach it On Mon, Jan 6, 2014 at 12:06 PM, javad bayat

Re: [R] Reversing the Equation to find value of variable

2014-01-06 Thread Frede Aakmann Tøgersen
Hi Reading the error message carefully you can see that f() is not defined at 0: uniroot(f, c(0, 1)) Error in uniroot(f, c(0, 1)) : f.lower = f(lower) is NA f(0) [1] NaN If you plot f() in the interval (0,1) then you'll see there is two solutions: uniroot(f, c(0.0001, 1)) Error in

Re: [R] R compatible with Office 2013

2014-01-06 Thread David Winsemius
On Jan 6, 2014, at 6:36 AM, Sarah King wrote: Hi I tried to install R on my laptop which has Office 2013 on it. The download didn't work, is this because R is not compatible with Office 2013? In a word, no. It's more likely that some corporate security barrier is preventing installation.

Re: [R] replace to NA.

2014-01-06 Thread Marc Schwartz
On Jan 6, 2014, at 5:57 AM, vikram ranga babuaw...@gmail.com wrote: Dear All, I am bit stuck to a problem of replacing to NA. I have big data set but here is the toy example:- test-data.frame( test1=c(,Hi,Hello), test2=c(Hi,,Bye), test3=c(Hello,,)) If the data as in above, I could

Re: [R] replace to NA.

2014-01-06 Thread jim holtman
try this: test-data.frame( + test1=c(,Hi,Hello), + test2=c(Hi,NA,Bye), + test3=c(Hello,,)) test test1 test2 test3 1 Hi Hello 2Hi NA 3 Hello Bye test[] - lapply(test, function(x){ + x[!is.na(x) x == ''] - NA + x + }) test test1 test2 test3 1 NAHi Hello 2

Re: [R] help

2014-01-06 Thread javad bayat
Dear Petr; I saw the nnet and neuralnet packag, and I cant find some thing relating with my data based on neural network. On Mon, Jan 6, 2014 at 10:55 AM, PIKAL Petr petr.pi...@precheza.cz wrote: Hi Why you did not use dput for sending data? It is far better than picture, which can not be

Re: [R] replace to NA.

2014-01-06 Thread arun
Hi, Try: test[test== !is.na(test)] - NA A.K. On Monday, January 6, 2014 7:51 AM, vikram ranga babuaw...@gmail.com wrote: Dear All, I am bit stuck to a problem of replacing to NA. I have big data set but here is the toy example:- test-data.frame( test1=c(,Hi,Hello), test2=c(Hi,,Bye),

Re: [R] help

2014-01-06 Thread PIKAL Petr
Hi can you be more specific? In what aspect those packages does not comply with your data? What did you do for testing it? I am not an expert in neural networks but I do not see anything which prevents using your data in nnet. Petr -Original Message- From:

Re: [R] replace to NA.

2014-01-06 Thread vikram ranga
Hi Arun Jim Marc, Thank you! The solution worked well! It seems I am using too many unnecessary loops to solve my problems. I have tried using is.na() before posting: for(i in 1:3){ for(j in 1:3){ if(is.na(test[j,i])){ test[j,i]= } } } # but here the factors were creating problems. Thanks

[R] OT: regex golf

2014-01-06 Thread Sarah Goslee
Because we get a lot of questions on regex here: http://xkcd.com/1313/ Anybody want to write a regex golf package for R? Sarah -- Sarah Goslee http://www.functionaldiversity.org __ R-help@r-project.org mailing list

Re: [R] Reversing the Equation to find value of variable

2014-01-06 Thread Katherine Gobin
Dear Sir, Thanks a lot for your wonderful guidance. It gave me a new vision to look at teh equations. Really appreciate. Thanks a lot once again. Katherine On Monday, 6 January 2014 5:31 PM, Frede Aakmann Tøgersen fr...@vestas.com wrote: Hi Reading the error message carefully you can

[R] Signif. codes

2014-01-06 Thread 王筱琪
My question is about the Signif. codes , the output when I run matcoef =cbind(fit$par, se.coef,tval,2*(1-pnorm(abs(tval dimnames(matcoef)=list(names(tval),c(Estimate,Std.Error,t value,pr(|t|))) cat(\nCoefficient(s):\n) printCoefmat(matcoef, digits=4, signif.stars = TRUE)

[R] The URL for the replacement dll/so bundle - Re: 2 bugs in R's grDevices, and fixes.

2014-01-06 Thread Hin-Tak Leung
Hin-Tak Leung wrote: ... Somewhat related, I have finally gotten round to make two small bundles, which replace the small cairo.dll/cairo.so' in the official windows or Mac R binaries, to fix quite a few problems with them, the first of which was reported almost a year ago. Just move the two

[R] R ggplot vertical and horizontal line intercept at center

2014-01-06 Thread Weijia Wang
I have a regression line, called mean. X-axis is called week Now, I want to draw vertical and horizontal lines, from each point of the regression line, to x-axis and y-axis. Here is my code: ggplot()+ geom_linerange(data=df2,x=df2$week, ymin=0, ymax=df2$mean, colour=#00,size=0.1)+

Re: [R] Signif. codes

2014-01-06 Thread William Dunlap
Capitalize your column name pr(...) - printCoefmat is looking for Pr(...). Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of ??? Sent: Monday, January 06, 2014 5:53 AM

[R] Is this a bug or am I making a mistake?

2014-01-06 Thread Walter Anderson
I have a data frame that I am extracting some records from and noticed the following issue I originally used tmp - subset(dd, dd$EVYEAR==2012 dd$EVMONTH=='02') and noticed that I wasn't ending up with all of the records I should have; however, when I used tmp - dd[dd$EVYEAR==2012

Re: [R] Is this a bug or am I making a mistake?

2014-01-06 Thread Sarah Goslee
Hi Walter, I can't reproduce your results. Please provide some data that demonstrates the problem. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example subset() and [ differ in their handling of NA values, and you don't need the dd$ in the arguments to subset().

[R] Encoding issue

2014-01-06 Thread Dennis Fisher
R 3.0.2 OS X Colleagues, I know little about encoding so please be patient with this question. I have a CSV file created from a SAS7BDAT dataset (using Shotwell's SAS7BDAT package). In the CSV file, when opened with XL, one entry reads as: ¸æçñàºmol/L When I read this into R, that

Re: [R] time series has no or less than 2 periods

2014-01-06 Thread Rajaraman V
blockLength - 37 # can be anything you like ts1 - ts(rnorm(2*blockLength-1, 0,2), frequency=blockLength) de - decompose(ts1) # error ts2 - ts(rnorm(2*blockLength, 0,2), frequency=blockLength) de - decompose(ts2) plot(de) So the trick is to have at least two periods in your time series. Even

Re: [R] time series has no or less than 2 periods

2014-01-06 Thread Rajaraman V
For decomposing a time series into seasonal components, you need at least 2 seasons worth of data. If you have even one data point less, you will see this error message. blockLength - 52 ts1 - ts(rnorm(2*blockLength-1), frequency=blockLength) decompose(ts1) # error ts2 -

Re: [R] Is this a bug or am I making a mistake?

2014-01-06 Thread Walter Anderson
On 01/06/2014 11:14 AM, Sarah Goslee wrote: Hi Walter, I can't reproduce your results. Please provide some data that demonstrates the problem. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example subset() and [ differ in their handling of NA values, and you

Re: [R] Is this a bug or am I making a mistake?

2014-01-06 Thread William Dunlap
You could compare the outputs of z1 - with(dd, dd$EVYEAR==2012 dd$EVMONTH=='02') (which is like subset()) and that of z2 - dd$EVYEAR==2012 dd$EVMONTH=='02' (evaluated from within the same context) with table(z1, z2, exclude=NULL) That may show something useful. Bill Dunlap

Re: [R] Removing unused parameter in qqplot

2014-01-06 Thread Peter Maclean
With these toy data, how can I remove unused empty space between the bars?   #Toy data x1 - as.data.frame(rep(1:3,   c(10,2,6))) colnames(x1) - c(name) x2 - as.data.frame(rep(5:7,   c(14,5,8))) colnames(x2) - c(name) x3 - as.data.frame(rep(10:12, c(5,5, 8))) colnames(x3) - c(name) x4 -

[R] 2 bugs in R's grDevices, and fixes.

2014-01-06 Thread Hin-Tak Leung
Just before the holiday, I asked the freetype developers what is the context of these two comments about freetype in the code of R's grDevices: === R/src/library/grDevices/src/cairo/cairoFns.c around line 720 = /* some FreeType versions have broken index support,

[R] Levelplots with non-continuous x-axis breaks

2014-01-06 Thread Pachapep
Hi all, I have a matrix which I want to plot in color. I have extensively looked at level plot and heatmap/heatmap.2, but I would like to be able to manage the size of the bins (boxes) on my X axis. So I thought of simply using the rect() function, but I can’t get around assigning the correct

[R] Packaging: Doubt in relation with R CMD Rd2pdf packagename

2014-01-06 Thread Eva Prieto Castro
Hi everybody, I have created a package without documentation and now I want to create it with a pdf manual. That is the reason why I have created the .Rd files in man folder. In this way I obtain a pdf manual usind R CMD check packagename, but it ignores the \code{\link{function.name}}... I

Re: [R] Packaging: Doubt in relation with R CMD Rd2pdf packagename

2014-01-06 Thread Richard M. Heiberger
This looks like a PATH problem. Most likely Miktex isn't where you told R to find it. FInd out where miktex is by typing pdflatex in the Start button search box. Right click on it when it appears and then click properties. The properties window has a Location field. The value in the location

Re: [R] Removing unused parameter in qqplot

2014-01-06 Thread Ista Zahn
On Mon, Jan 6, 2014 at 7:36 PM, Peter Maclean pmaclean2...@yahoo.com wrote: With these toy data, how can I remove unused empty space between the bars? There is no unused space. It is very hard to see how you could remove the empty space and still have a meaningful graph. Best, Ista #Toy data