[R] Fw: Value of 'pi'

2011-06-02 Thread Iasonas Lamprianou
Indeed, Indiana had a go at pi. Have a look here http://en.wikipedia.org/wiki/Indiana_Pi_Bill Dr. Iasonas Lamprianou Department of Social and Political Sciences University of Cyprus [[alternative HTML version deleted]] __

[R] need help for R Installation in AIX 5.3

2011-06-02 Thread Harvir Singh
Dear Sir/ Madam, I am trying to install R in my AIX-5.3 machine but its giving some error during configuration as given below: checking how to hardcode library paths into programs... immediate checking for cos in -lm... yes checking for sin in -lm... yes checking for dlopen in -ldl... yes

[R] [Plea to the R Gods] Theoretical and Empirical CDFs

2011-06-02 Thread teriri
http://r.789695.n4.nabble.com/file/n3567636/ecdfs.jpg ecdfs.jpg http://r.789695.n4.nabble.com/file/n3567636/ecdf_curve.gif ecdf_curve.gif Hello, I have generated a plot of two empirical CDFs (attachment 1). As a result, they are stepwise when plotted. The following code was used:

Re: [R] subsetting with condition

2011-06-02 Thread kristina p
Thank you all, tried all options and it gives me exactly what I needed! Many many thanks again) to Bert, oh, I see, yes, next time I will do that. Kristina -- View this message in context: http://r.789695.n4.nabble.com/subsetting-with-condition-tp3567193p3567645.html Sent from the R help

[R] Random Selection of numbers

2011-06-02 Thread ogbos okike
Hello, I am attempting to randomly select a data of equal length from my dataset. My dataset is of equal length each ranging from 1 to 16 rows. Since they are of equal length, I can form a matrix of equal length and rows or concatenate them into a data of 16n x 2 matrix where n is number of

[R] allowing individual level correlations to differ by cluster in lme in R

2011-06-02 Thread Edmond.Ng
Dear R-listers, I am fitting bivariate mixed models for cost-effectiveness data of cluster randomized trials using lme in R. So I have individuals nested within clusters. My response variable is a vector with bivariate response (individual level costs and effects) stacked into a single

Re: [R] need help for R Installation in AIX 5.3

2011-06-02 Thread Prof Brian Ripley
1) Please ask about R installation on the R-devel list: as the posting guide says Questions likely to prompt discussion unintelligible to non-programmers should go to to R-devel. 2) This is covered quite explicitly in the 'R Installation and Administration Manual'. Search for 'readline'

[R] based on mean and std

2011-06-02 Thread Alaios
Dear all, I have a few gaussian distributions with known (mean and sd). How can I plot in R easily the cdf of them? In matlab there is a guid where you can give the values and have the plots ready. Is anything like that in R? Best Regards Alex __

Re: [R] Metafor: Differences between two categories of a moderator

2011-06-02 Thread Viechtbauer Wolfgang (STAT)
Well, that's a good question. It actually applies to many different contexts (not just meta-analysis). Think of the ANOVA F-test and post-hoc/planned contrasts. It's essentially the same situation. And if you would ask 10 different statisticians about this, you may get 11 different answers. My

Re: [R] based on mean and std

2011-06-02 Thread Stephen Ellison
You can plot explicitly over a range of x; for example x-seq(10, 15, 0.1) #for mean 12.5, sd 0.6 plot(x, pnorm(x, 12.5, 0.6), type=l, ylim=c(0,1) Or you can try the default plot for a univariate function (see ?curve) plot(function(x) pnorm(x, 12.5, 0.6), xlim=c(10,15)) #Note use of the

Re: [R] based on mean and std

2011-06-02 Thread Patrick Breheny
You could try: f - function(x){pnorm(x,mean=10,sd=20)} curve(f,from=-10,to=30) Or: x - seq(-10,30,len=101) y - pnorm(x,mean=10,sd=20) plot(x,y,type=l) -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky On 06/02/2011 07:05 AM,

Re: [R] Text Summarization

2011-06-02 Thread marchywka
What is wrong with lsa? You could contact author of that package if it is close and discuss better options if no one here can help. your latest def just reiterate summarization but that you want complrtr sentences. if you can site specific algor or impl and go to a sig list may be more help

Re: [R] [Plea to the R Gods] Theoretical and Empirical CDFs

2011-06-02 Thread Patrick Breheny
On 06/02/2011 02:18 AM, teriri wrote: I have generated a plot of two empirical CDFs (attachment 1). As a result, they are stepwise when plotted. ... But what I need instead are smooth curves, similar to ones that are generated from a theoretical cdf (attachment 2). To obtain a smooth curve,

[R] (no subject)

2011-06-02 Thread Ungku Akashah
Error in lda.default(x, grouping, ...) : variables 1 3 5 8 10 15 17 20 27 29 34 appear to be constant within groups what this sentence means?? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] re-write plot function for ggplot

2011-06-02 Thread rmje
I have been browsing the pages about ggplot and it really doesn't deal with such problems as far as I can see. -- View this message in context: http://r.789695.n4.nabble.com/re-write-plot-function-for-ggplot-tp3565868p3568025.html Sent from the R help mailing list archive at Nabble.com.

[R] Export a function from RCPP in R of type double

2011-06-02 Thread arvanitis
Hello to everyone I have written a small c++ function of type double function(double,double); and i want to export it in R using RCPP. After some trials i have realized that the only way i could do it working is to declare the function as void function (double x, double y, double result) and pass

Re: [R] BiodiversityR GUI on macosx

2011-06-02 Thread Ben Bolker
János Korponai korponai.janos at nyuduvizig.hu writes: Dear List! I installed R and quite a few packages I use. When I try to start BiodiversityR the library loads without any problems but GUI do not start. Rcmdr loads without any problems. I am using R 2.13.0 64 bit. Downgrade to R

Re: [R] ylab spacing in resizePanels in latticeExtra

2011-06-02 Thread Felix Andrews
Indeed, ylab position is not connected to the panel size / position. You would have to place them manually... ## scaling factors on panels h - c(5,3,4) update(ABCur, ylab = list(c(AAA, BBB, CCC), rot=0, y = (cumsum(h) - h/2) / sum(h) )) Cheers Felix On 2 June 2011

Re: [R] Latin Hypercube Sampling with a condition

2011-06-02 Thread Rob Carnell
Duarte Viana viana.sptd at gmail.com writes: Hello all, I am trying to do a Latin Hypercube Sampling (LHS) to a 5-parameter design matrix. I start as follows: library(lhs) p1-randomLHS(1000, 5) If I check the distribution of each parameter (column), they are perfectly uniformly

[R] mChoice prb in rms

2011-06-02 Thread moleps
Dear all, I´m trying to get a output table for age and the summary of a and b, stratified by epo as follows using summary.formula h-data.frame(a=sample(c(A,NA),100,replace=T),b=sample(c(B,NA),100,replace=T),age=rnorm(100,50,25),epo=sample(c(Y,N),100,T)) library(rms)

[R] Reparamaterization for threshold values for ordinal regression

2011-06-02 Thread treeyp
I'm writing a function for ordinal regression for an ad hoc situation.  To estimate threshold parameters (4 levels), I applied reparameterization method to avoid using linear constraint suggested  by C. Croux. This is working fine, but I have a problem finding varaince for the 

Re: [R] Latin Hypercube Sampling with a condition

2011-06-02 Thread Ravi Varadhan
I am not sure, but this thread from a couple of months ago might be relevant (and useful): https://stat.ethz.ch/pipermail/r-help/2011-March/273423.html Ravi. From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] on behalf of Rob Carnell

Re: [R] Random Selection of numbers

2011-06-02 Thread Petr Savicky
On Thu, Jun 02, 2011 at 09:56:51AM +0200, ogbos okike wrote: Hello, I am attempting to randomly select a data of equal length from my dataset. My dataset is of equal length each ranging from 1 to 16 rows. Since they are of equal length, I can form a matrix of equal length and rows or

[R] Latin Hypercube Sampling with a condition

2011-06-02 Thread Duarte Viana
Thanks Rob and Ravi for the replies. Let me try to explain my problem. I am trying to make a kind of sensitivity analysis where I have 5 parameters (the margins of the Latin hypercube), 3 of them are proportions that should sum to one. My idea is to obtain uniform combinations of the 3

[R] shading in overlap between two ranges

2011-06-02 Thread Graves, Gregory
I have 2 datafiles 'target' and 'observed' as shown below (I will gladly email these 2 small files to whomever). X25. And X75. Indicate the value of 25th and 75th-percentile of the target ('what should be') and the observed ('what is'). The i.value is simply the month. target X

Re: [R] Removing rows of zeros from a matrix

2011-06-02 Thread Jim Silverton
Hi, Can someone tell me how to remove rows of zeros from a matrix? For example if I have the following matrix, 0 0 0 1 2 8 0 0 4 56 I should end up with 0 1 2 8 4 56 -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] Export a function from RCPP in R of type double

2011-06-02 Thread Dirk Eddelbuettel
On 2 June 2011 at 01:27, arvanitis wrote: | I have written a small c++ function of type double function(double,double); | and i want to export it in R using RCPP. After some trials i have realized Rcpp uses the .Call() interface which imposes 'SEXP function(SEXP, SEXP, ...); Please see 'Writing

Re: [R] Removing rows of zeros from a matrix

2011-06-02 Thread Jonathan Daily
Assuming the matrix is named X: X[which(rowSums(X) 0),] should work. Also, this list is a text-only list. As you are using gmail, sending text only messages is very easy, and may clear confusion in future posts. HTH, Jon On Thu, Jun 2, 2011 at 11:23 AM, Jim Silverton jim.silver...@gmail.com

Re: [R] Removing rows of zeros from a matrix

2011-06-02 Thread Petr Savicky
On Thu, Jun 02, 2011 at 11:23:28AM -0400, Jim Silverton wrote: Hi, Can someone tell me how to remove rows of zeros from a matrix? For example if I have the following matrix, 0 0 0 1 2 8 0 0 4 56 I should end up with 0 1 2 8 4 56 Hi. Try the following a - matrix(c(0, 0, 2, 0,

[R] Nuisance parameters

2011-06-02 Thread Alexander Lebedev
Dear R-experts, Please, excuse me for disturbing... I tried to find the answer to my question in archives without any result... I assume, this is going to look like a stupid question... I have dataset of different brain structures within two groups of subjects. But unfortunately these groups are

[R] an efficient way to calculate correlation matrix

2011-06-02 Thread Bill Hyman
Dear all, I have a problem. I have m variables each of which has n observations. I want to calculate pairwise correlation among the m variables and store the values in a m x m matrix. It is extremely slow to use nested 'for' loops if m and n are large. Is there any efficient alternative to

Re: [R] [Plea to the R Gods] Theoretical and Empirical CDFs

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 2:18 AM, teriri wrote: http://r.789695.n4.nabble.com/file/n3567636/ecdfs.jpg ecdfs.jpg http://r.789695.n4.nabble.com/file/n3567636/ecdf_curve.gif ecdf_curve.gif Hello, I have generated a plot of two empirical CDFs (attachment 1). As a result, they are stepwise when

[R] predict with eha package

2011-06-02 Thread Mike Harwood
Hello list, and thank you in advance. I'm unable to generate predicted values when specifying newdata using phreg and aftreg models in the eha package, but I do not have the same problem with a proportional hazards model from coxph. Without the newdata argument the predicted values are returned,

Re: [R] lattice panel fine control

2011-06-02 Thread maxbre
thank you so much for the very detailed indications which turned out to be a real help in ponting me to the right direction; referring back to my previous questions there is something still open: 2- I'm in trouble with the point labels because I would like to rotate them by an angle of 90

[R] ARM package for R 2.10.1

2011-06-02 Thread jmdpulido
Dear all... I am looking for the zip file of an old version of the ARM package compatible for R 2.10.1 version. When I try to charge the ARM package I get the following message package 'arm' was built under R version 2.13.0 . I can not update R to 2.13.0 as I always get this error the setup

[R] Line histogram for a matrix

2011-06-02 Thread Sakti
Hi guys! I'm new to R, but I was wondering if one could plot many histograms into a single graph each having a different color. To make things clear: Suppose you have a matrix of 100 rows and 10 columns. I'm interested in plotting the histogram for each row, but it should not appear as bars but

[R] What type of bootstrapping is used in package vars?

2011-06-02 Thread jessezeng
Hi, I used the package vars for my project but when the impulse response plots were produced, some of the levels are out of the confidence band. I was wondering what the problem is and also, does anyone know what type of bootstrapping the package is using: is it parametric, case resampling,

[R] multicore: collect slow on large objects?

2011-06-02 Thread Trond Arild Ydersbond
I use package multicore, and it works very well. There is, however, one thing I wonder if I don't do correctly, here is one example:  I read ca 5.5 mill records into a dataframe, using read.dta through a one-line function rdam1. It runs nicely in parallel with other activitites.   p1 - 

[R] Counting occurrences in a moving window

2011-06-02 Thread mdvaan
Hi list, based on the following data.frame I would like to create a variable that indicates the number of occurrences of A in the 3 years prior to the current year: DF = data.frame(read.table(textConnection( A B 8025 1995 8026 1995 8029 1995 8026 1996 8025 1997 8026 1997 8025 1997 8027

[R] Help in a project

2011-06-02 Thread Tarun Manchanda
To whom it may concern, I am a new user to R and I need help in my if and for statements as I need a place marker. I would like to convert the following table: Observation | Variable 1 |- 1 | 1 2 | A 3 | 631 Into : Observation| Variable 1 | Variable 1 Flag

[R] Using SQLDF to pick values based on word count

2011-06-02 Thread Abraham Mathew
I have a data frame in R with the following values. cars autocar cars info what is that donna drive car telephone i need car... I want to select all values which contain 'car', values with three words, and those keywords with car that contain three words. The first part is done with :

Re: [R] shading in overlap between two ranges

2011-06-02 Thread Dennis Murphy
Hi: Here's one approach using geom_ribbon() in ggplot2 - the 'overlap' is the change in color where the two ribbons intersect. Using your example data with the same names and the 'one.month' variable removed, library(ggplot2) ggplot() + geom_ribbon(data = target, aes(x = i.value, ymin = X25,

Re: [R] an efficient way to calculate correlation matrix

2011-06-02 Thread Dennis Murphy
?cor Example: dd - data.frame(x1 = rnorm(40), x2 = rnorm(40), x3 = runif(40, 0, 10)) 'data.frame': 40 obs. of 3 variables: $ x1: num -0.5585 1.3831 -1.7862 0.0572 0.2825 ... $ x2: num -0.5247 -0.8636 -0.0749 0.2399 -0.1592 ... $ x3: num 7.698 5.259 0.918 3.251 5.169 ... cor(dd)

Re: [R] Latin Hypercube Sampling with a condition

2011-06-02 Thread Rob Carnell
Duarte Viana viana.sptd at gmail.com writes: Thanks Rob and Ravi for the replies. Let me try to explain my problem. I am trying to make a kind of sensitivity analysis where I have 5 parameters (the margins of the Latin hypercube), 3 of them are proportions that should sum to one. My idea

Re: [R] Zero-inflated regression models: predicting no 0s

2011-06-02 Thread geojs
Thanks for the quick reply, I understand that the predict(zip1A, type = response) command is computing the fitted_means and these are different than the probabilities predict(zip1A, type = prob). Although, according to Martin (2005), the highest probabilities do not simply lead to the true count

[R] generically forward low-level graphic parametres in function

2011-06-02 Thread eldor ado
Hello, following problem: i have a written my own function to draw some sophisticated graphic, which after manipulating data somewhere contains a plot comand function - function(x) { ... plot(xy) } to tidy up my final graphs, it would be very handy to be able forward all low-level graphic

Re: [R] Help in a project

2011-06-02 Thread K. Elo
Hello, three commands might do the job (NOTE: df=your data frame, obser=Observation, var1=Variable 1 [TYPE: string], var1flag=Variable 1 flag [TYPE: string]) 1. df$var1flag-NA 2. df$var1flag[ is.na(as.numeric(df$var1)) ]-df$var1[ is.na(as.numeric(df$var1)) ] 3. df$var1-as.numeric(df$var1)

[R] confusion matrix error

2011-06-02 Thread romzero
Hi, this is my R-script I need to make a confusion matrix but the last row return me an error require(mixOmics) require(SDMTools) file - C:\\data.txt d - read.table(file, header=T, row.names = NULL) X - as.matrix(d[,2:11]) Y - as.factor(d[,1]) i - 1 samp - sample(1:3, nrow(X), replace = TRUE)

Re: [R] ARM package for R 2.10.1

2011-06-02 Thread Jonathan Daily
I would recommend trying to fix the installation of R 2.13.0 rather than trying to obtain old packages. Try downloading the installer again from a different mirror. On Thu, Jun 2, 2011 at 10:33 AM, jmdpulido jmdpul...@yahoo.es wrote: Dear all... I am looking for the zip file of an old version

Re: [R] generically forward low-level graphic parametres in function

2011-06-02 Thread Jonathan Daily
try using `...` function - function(x, ...) { #do stuff plot(xy, ...) } On Thu, Jun 2, 2011 at 1:26 PM, eldor ado rat.c...@gmail.com wrote: Hello, following problem: i have a written my own function  to draw some sophisticated graphic, which after manipulating data somewhere contains a

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
Thanks Prof. Ripley and Duncan for your pointers. Noting down your points I have modified my way of building package and have done following so far: 1. In my C: drive I create one working folder naming R_PackageBuild 2. In R console I have written following codes: setwd(c:/R_packageBuild)

Re: [R] ARM package for R 2.10.1

2011-06-02 Thread Prof Brian Ripley
On Thu, 2 Jun 2011, Jonathan Daily wrote: I would recommend trying to fix the installation of R 2.13.0 rather than trying to obtain old packages. Try downloading the installer again from a different mirror. He has already been given help (3x) to that effect. People who fail to acknowledege

Re: [R] Latin Hypercube Sampling with a condition

2011-06-02 Thread Duarte Viana
Thanks again Rob for your help. In terms of parameter comparison there won't be a problem. However, if one wants to assume a particular distribution (and not the one given by the imposed condition), for example an uniform distribution to obtain all the possible combinations (all the

Re: [R] Problem with package development

2011-06-02 Thread Duncan Murdoch
On 02/06/2011 2:03 PM, Nipesh Bajaj wrote: Thanks Prof. Ripley and Duncan for your pointers. Noting down your points I have modified my way of building package and have done following so far: 1. In my C: drive I create one working folder naming R_PackageBuild 2. In R console I have written

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
What else I need to do? In the Read-and-delete-me file following steps are asked to perform: * Edit the help file skeletons in 'man', possibly combining help files for multiple functions. * Edit the exports in 'NAMESPACE', and add necessary imports. * Put any C/C++/Fortran code in 'src'. * If you

Re: [R] Line histogram for a matrix

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 11:04 AM, Sakti wrote: Hi guys! I'm new to R, but I was wondering if one could plot many histograms into a single graph each having a different color. To make things clear: Suppose you have a matrix of 100 rows and 10 columns. I'm interested in plotting the histogram

[R] plotmath: paste string and expression [from a vector of expressions]

2011-06-02 Thread Marius Hofert
Dear all, I have a vector of expressions and would like to paste some string to it before using it in a plot: vars - vector(expression, 2) vars[1] - expression(alpha) vars[2] - expression(beta) plot(0, 0, main=substitute(bold(Foo ~~ VAR), list(VAR=vars[2]) )) Although I tried hard, I just

Re: [R] Problem with Snowball RWeka

2011-06-02 Thread flobede
Greetings to all, I have a similar issue with Snowball. I am runing R version 2.12.1 (2010-12-16) on windows 7 Here is my script : library(tm) custom.xml - system.file(texts, custom.xml, package = tm) print(readLines(custom.xml), quote = FALSE) myXMLReader - readXML( spec =

[R] complex search between dataframes

2011-06-02 Thread Filippo Beleggia
Hi! I am very new to R, I hope someone can help me. I have two dataframes: data1-data.frame(from=c(1,12,16,40,55,81,101),to=c(10,13,23,45,67,99,123)) data2-data.frame(name=c(1,2,3,4,5,6,7,8,9),position=c(2,14,20,50,150,2000,2001,2002,85)) I want to know which of the entries in position of

[R] Matrix Question

2011-06-02 Thread Ben Ganzfried
Hi, First of all, I would like to introduce myself as I will probably have many questions over the next few weeks and want to thank you guys in advance for your help. I'm a cancer researcher and I need to learn R to complete a few projects. I have an introductory background in Python. My

Re: [R] lattice panel fine control

2011-06-02 Thread Bert Gunter
You did not read the help files carefully enough. The Help for panel.text tells you that it is the same function as ltext. ltext lists a bunch of parameters, srt among them, and refers you to the corresponding base R graphics function, which is text(). ?text then refers you to par for this and

[R] Error message while mapping probes with hgu133plus2.db

2011-06-02 Thread Vickie S
Hi, eset is an expressionset based on hgu133plus2 platform. Using hgu133plus2.db package, I want to map probes to UniGene cluster IDs. It results in an error message. xx=hgu133plus2UNIGENE uniaf1=xx[[as.character(featureNames(eset))]] Error in .checkKeys(value, Lkeys(x), x@ifnotfound) :

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
I have run R CMD check trial1 and saw an error. This says that: * checking pdf version of manual without hyperrefs or index ... ERROR Re-running with no redirection of stdout/stderr. Hmm... looks like a package Error in texi2dvi(Rd2.tex, pdf = (out_ext == pdf), quiet = FALSE, : pdflatex is not

Re: [R] Regex Question: return digits after particular letters

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 2:54 PM, Ben Ganzfried wrote: Hi, First of all, I would like to introduce myself as I will probably have many questions over the next few weeks and want to thank you guys in advance for your help. I'm a cancer researcher and I need to learn R to complete a few

Re: [R] re-write plot function for ggplot

2011-06-02 Thread Hadley Wickham
Doesn't deal with what problems? Hadley On Thursday, June 2, 2011, rmje robinmje...@gmail.com wrote: I have been browsing the pages about ggplot and it really doesn't deal with such problems as far as I can see. -- View this message in context:

[R] Paid R Help

2011-06-02 Thread Hess, Michael
Hello R people, I am looking to pay someone to help write some R code. Inputs: Study identifier: ID Number for the study, each ID number is for one study only each block set should only be used for that study. This will require that you store the results from the blocks someplace on the

[R] Plot cdf, pdf

2011-06-02 Thread Alaios
Dear all, do you know any easy way based on a vector input how to plot easily cdf and pdf. I would like to thank you in advance for your help Regards Alex __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Adding a line to a beside=TRUE barplot

2011-06-02 Thread Galen Moore
Greetings – Grateful for any help on this one: In the following demo code, I am trying to get the points in the line to appear over the same x-axis labels as are used by the paired Bars. It appears, however, that R/lattice ignores the x-axis points used by the bars and plots the x points

Re: [R] plotmath: paste string and expression [from a vector of expressions]

2011-06-02 Thread Uwe Ligges
On 02.06.2011 20:43, Marius Hofert wrote: Dear all, I have a vector of expressions and would like to paste some string to it before using it in a plot: vars- vector(expression, 2) vars[1]- expression(alpha) vars[2]- expression(beta) plot(0, 0, main=substitute(bold(Foo ~~ VAR),

[R] Removal of elements from nomograms

2011-06-02 Thread Rob James
The rms package includes the nomogram function, which generates a list object that can be passed to plot for graphical production of nomograms. I would like to remove the linear predictor line in the graph, which means (I suspect) removing it from the nomogram output object. I've looked at

Re: [R] plotmath: paste string and expression [from a vector of expressions]

2011-06-02 Thread Marius Hofert
Dear Uwe, thanks for your help. Actually, I first thought about writing your solution in the email in order to make clear that it is not the solution I'm looking for :-) My goal is to work with the vector vars of expressions. The example is only a minimal example and for that your solution is

Re: [R] Regex Question: return digits after particular letters

2011-06-02 Thread Ben Ganzfried
Thank you very much for your help. It saved me a lot of time and it worked perfectly. I have a quick follow-up as I'm not sure I understand yet why the code works and where it comes from. For example, in: Tstg - sub(.*T(\\d)N., \\1, tmp) *How exactly does the substitution operation work? *On

Re: [R] plotmath: paste string and expression [from a vector of expressions]

2011-06-02 Thread Dennis Murphy
Hi: This seems to work: vars2 - c(quote(alpha), quote(beta)) # returns a list of mode call plot(0, 0, main = bquote(bold('Foo '~.(vars2[[2]] Expressions are only evaluated once, which means that inner expressions are not evaluated. You need a call object rather than an expression inside

Re: [R] Regex Question: return digits after particular letters

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 4:21 PM, Ben Ganzfried wrote: Thank you very much for your help. It saved me a lot of time and it worked perfectly. I have a quick follow-up as I'm not sure I understand yet why the code works and where it comes from. For example, in: Tstg - sub(.*T(\\d)N., \\1,

[R] print overlaid plots to a pdf file.. - Help please...

2011-06-02 Thread Santosh
Dear Rxperts! Below are relevant lines of code, I am having problems with.. I am not sure if it is a bug in R or OS related or something else... When viewing the pdf file, I notice overlaid plots in a panel of the plot are shifted to the right. The Y-axes and X-labels are not exactly on top of

Re: [R] plotmath: paste string and expression [from a vector of expressions]

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 4:19 PM, Marius Hofert wrote: Dear Uwe, thanks for your help. Actually, I first thought about writing your solution in the email in order to make clear that it is not the solution I'm looking for :-) My goal is to work with the vector vars of expressions. The example

Re: [R] Paid R Help

2011-06-02 Thread Marc Schwartz
On Jun 2, 2011, at 2:41 PM, Hess, Michael wrote: Hello R people, I am looking to pay someone to help write some R code. Inputs: Study identifier: ID Number for the study, each ID number is for one study only each block set should only be used for that study. This will require that

Re: [R] Removal of elements from nomograms

2011-06-02 Thread Frank Harrell
The documentation includes this: nomogram(fit, ..., lp=FALSE) Frank Rob James-2 wrote: The rms package includes the nomogram function, which generates a list object that can be passed to plot for graphical production of nomograms. I would like to remove the linear predictor line in the

Re: [R] Removal of elements from nomograms

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 4:19 PM, Rob James wrote: The rms package includes the nomogram function, which generates a list object that can be passed to plot for graphical production of nomograms. I would like to remove the linear predictor line in the graph, which means (I suspect) removing

Re: [R] shading in overlap between two ranges

2011-06-02 Thread Rolf Turner
(1) For crying out loud don't muck about with par(new=TRUE) like that. Use points() and lines() (and other plot functions) to add graphical constructs to existing plots. (And use TRUE not T --- it's a lot safer.) (2) In general for shading in regions between two lines on a plot, use

[R] Use line break at scrip but avoid line break on graphics

2011-06-02 Thread Walmes Zeviani
Hello list, I have plots with long strings in main=, ylab= or xlab=. So, in I my script I use break long lines to avoid lines hiden on my monitor and in sweave document pages. I use graphics like this plot(1, main= ) but I would like a plot

Re: [R] plotmath: paste string and expression [from a vector of expressions]

2011-06-02 Thread Marius Hofert
Dear Dennis, Dear Uwe, Dear David, many thanks for helping. Dennis and David, your solutions seemed perfectly fine, but when I applied it to my original problem, it did not show a title. Below is a (longer) minimal example (the first part is from the help page of bbmle). Is this a bug in

Re: [R] plotmath: paste string and expression [from a vectorof expressions]

2011-06-02 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Marius Hofert Sent: Thursday, June 02, 2011 1:20 PM To: Uwe Ligges Cc: Help R Subject: Re: [R] plotmath: paste string and expression [from a vectorof expressions] Dear Uwe,

Re: [R] Problem with package development

2011-06-02 Thread steven mosher
I hope you're successful because I'm having issues as well building a simple package on windows. maybe when you're finished you can share back a step by step guide. On Thu, Jun 2, 2011 at 12:21 PM, Nipesh Bajaj bajaj141...@gmail.com wrote: I have run R CMD check trial1 and saw an error. This

Re: [R] complex search between dataframes

2011-06-02 Thread Marc Schwartz
On Jun 2, 2011, at 1:42 PM, Filippo Beleggia wrote: Hi! I am very new to R, I hope someone can help me. I have two dataframes: data1-data.frame(from=c(1,12,16,40,55,81,101),to=c(10,13,23,45,67,99,123))

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
Still I am struggling to get some inputs from the experts here :( Definitely We can shere our experiences once I am done (really, it seems to me very hard nut to crack!) I strongly feel that related documentations should be more Statistician-friendly, than some Engg. guys Thanks, On Fri, Jun 3,

Re: [R] Use line break at scrip but avoid line break on graphics

2011-06-02 Thread Rolf Turner
On 03/06/11 09:03, Walmes Zeviani wrote: Hello list, I have plots with long strings in main=, ylab= or xlab=. So, in I my script I use break long lines to avoid lines hiden on my monitor and in sweave document pages. I use graphics like this plot(1, main=

Re: [R] Problem with package development

2011-06-02 Thread Sarah Goslee
I don't use windows, but this error message you report: Error in texi2dvi(Rd2.tex, pdf = (out_ext == pdf), quiet = FALSE, : pdflatex is not available Error in running tools:: texi2dvi strongly indicates that you need to install pdflatex, don't you think? If you don't have non-R code (c or

Re: [R] Use line break at scrip but avoid line break on graphics

2011-06-02 Thread Peter Langfelder
On Thu, Jun 2, 2011 at 3:13 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 03/06/11 09:03, Walmes Zeviani wrote: Hello list, I have plots with long strings in main=, ylab= or xlab=. So, in I my script I use break long lines to avoid lines hiden on my monitor and in sweave document pages.

Re: [R] plotmath: paste string and expression [from a vector of expressions]

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 5:07 PM, Marius Hofert wrote: Dear Dennis, Dear Uwe, Dear David, many thanks for helping. Dennis and David, your solutions seemed perfectly fine, but when I applied it to my original problem, it did not show a title. Below is a (longer) minimal example (the first part

Re: [R] Use line break at scrip but avoid line break on graphics

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 6:13 PM, Rolf Turner wrote: On 03/06/11 09:03, Walmes Zeviani wrote: Hello list, I have plots with long strings in main=, ylab= or xlab=. So, in I my script I use break long lines to avoid lines hiden on my monitor and in sweave document pages. I use graphics like

[R] lattice + plotmath: how to get a variable in bold face?

2011-06-02 Thread Marius Hofert
Dear all, How can I get a bold 1000 in the title? I would like to use a variable (as opposed to putting in 1000 directly). library(lattice) N - 1000 xyplot(0~0, xlab.top=list(label=as.expression(bquote(bold(foo ~ .(N) ~ bar))), font=2, cex=1.2)) ## = font=2 is ignored (of course) Cheers,

Re: [R] lattice + plotmath: how to get a variable in bold face?

2011-06-02 Thread Peter Ehlers
On 2011-06-02 15:50, Marius Hofert wrote: Dear all, How can I get a bold 1000 in the title? I would like to use a variable (as opposed to putting in 1000 directly). library(lattice) N- 1000 xyplot(0~0, xlab.top=list(label=as.expression(bquote(bold(foo ~ .(N) ~ bar))), font=2, cex=1.2)) ## =

Re: [R] Problem with package development

2011-06-02 Thread Joshua Wiley
Hi, On Thu, Jun 2, 2011 at 11:30 AM, Nipesh Bajaj bajaj141...@gmail.com wrote: I editied the help page for fn1() function (as I already communicated in previous mail) as follows: \name{fn1} \alias{fn1} \title{ A function. } \description{ A function. } \usage{ A function. What

Re: [R] Use line break at scrip but avoid line break on graphics

2011-06-02 Thread Rolf Turner
On 03/06/11 10:16, Peter Langfelder wrote: On Thu, Jun 2, 2011 at 3:13 PM, Rolf Turnerrolf.tur...@xtra.co.nz wrote: On 03/06/11 09:03, Walmes Zeviani wrote: Hello list, I have plots with long strings in main=, ylab= or xlab=. So, in I my script I use break long lines to avoid lines hiden on

Re: [R] Use line break at scrip but avoid line break on graphics

2011-06-02 Thread Peter Langfelder
Absolutely not!  Did you *read* the OP's question?  He wants to break the line in the code --- for readable code presumably --- but ***not*** in the output!   Your advice is the antithesis of what is required.    cheers,        Rolf Turner I stand corrected, indeed I missed the crucial

Re: [R] Problem with package development

2011-06-02 Thread Rolf Turner
On 03/06/11 11:33, Joshua Wiley wrote: Hi, On Thu, Jun 2, 2011 at 11:30 AM, Nipesh Bajajbajaj141...@gmail.com wrote: I editied the help page for fn1() function (as I already communicated in previous mail) as follows: \name{fn1} \alias{fn1} \title{ A function. } \description{ A function. }

Re: [R] Problem with package development

2011-06-02 Thread Joshua Wiley
On Thu, Jun 2, 2011 at 4:49 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 03/06/11 11:33, Joshua Wiley wrote: Hi, On Thu, Jun 2, 2011 at 11:30 AM, Nipesh Bajajbajaj141...@gmail.com  wrote: I editied the help page for fn1() function (as I already communicated in previous mail) as

Re: [R] Problem with package development

2011-06-02 Thread Joshua Wiley
Okay, that might have been a little strong. screams bloody murder is a warning, not technically an error, and does not occur when simply running R CMD build. That said, the OP did mention using R CMD check and pdflatex is not an issue when only building anyway. Still, it is not the cause of the

Re: [R] Problem with package development

2011-06-02 Thread Rolf Turner
On 03/06/11 12:16, Joshua Wiley wrote: Okay, that might have been a little strong. screams bloody murder is a warning, not technically an error, and does not occur when simply running R CMD build. That said, the OP did mention using R CMD check and pdflatex is not an issue when only building

  1   2   >