[R] Checking for combination of words in a sentence

2011-06-02 Thread vioravis
I am trying to implement some expert rules based on the presence or absence of words in a sentence. I have given a reproducible example below. In this, every time I come across the words lunch and bag in the same sentence, the outcome would be 1. If lunch and pack are in the same sentence, then the

Re: [R] BiodiversityR GUI on macosx

2011-06-02 Thread Graham Smith
Janos, Vegan has just been updated due to a problem with BiodiversityR and R 2.13, not sure if its the same issue you are having, but updating vegan could be worth a try. Graham On 1 June 2011 20:08, János Korponai wrote: > Dear List! > > I installed R and quite a few packages I use. When I

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

2011-06-02 Thread Marius Hofert
Dear Dennis, Dear Peter, thank you very much, as.character() worked perfectly. Nice solution :-) All the best, Marius On 2011-06-03, at 03:42 , Dennis Murphy wrote: > If you're trying to figure out a way to embolden a Greek letter in > plotmath, it ain't gonna happen. From the plotmath help pa

Re: [R] Problem with package development

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 11:48 PM, Nipesh Bajaj wrote: This is how strange? How and from where I would know that I need to install something pdflatex separately? Can you point some legitimate link which says I need to install that (like Rtools?) Even this link 'http://www.math.rug.nl/~trentelman/jaco

Re: [R] how do I extract a certain column from a dataframe without headers???

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 11:21 PM, Soyoung Jang wrote: The following are the first 6 rows of the data...I named it "file" and I have no idea how I can extract column 15, But, how did you make it. Is it a data.frame or a matrix? because there are no headers in this data.Can you please help me

Re: [R] barplot - change width of bar outline

2011-06-02 Thread Marc Schwartz
On Jun 2, 2011, at 10:54 PM, Rolf Turner wrote: > On 03/06/11 10:26, CAB wrote: >> Dear R users >> I am modifying a column chart which I have created in R using barplot to >> make it clearer. I have been able to change the settings to increase the >> width of the axes lines and the text size but

Re: [R] Problem with package development

2011-06-02 Thread Joshua Wiley
Hi, I use MikTeX on Windows and it works like a charm. Here's the link: http://www.miktex.org/ I chose it after reading the installation manual: http://cran.r-project.org/doc/manuals/R-admin.html The entire thing is very helpful, but particularly note Appendix D, where you will find that for a

Re: [R] mlogit.data

2011-06-02 Thread 2guard
On the same token, is it possible to run a mlogit on a data set that has differing numbers of "alt.vars"? would this dataset be valid with the addition of the below bolded record? 1 1 air no 695910070 351 2 1 train no 343137271

[R] how do I extract a certain column from a dataframe without headers???

2011-06-02 Thread Soyoung Jang
The following are the first 6 rows of the data...I named it "file" and I have no idea how I can extract column 15, because there are no headers in this data.Can you please help me with that? Thank you! 40 37 1 1 8 8 40 40 1 7 1 0 40 041344 716049158 21643 3246 1 4 2 25240 1

Re: [R] Matrix Question

2011-06-02 Thread Bill.Venables
Here is one way you might do it. > con <- textConnection(" + characteristics_ch1.3 Stage: T1N0 Stage: T2N1 + Stage: T0N0 Stage: T1N0 Stage: T0N3 + ") > txt <- scan(con, what = "") Read 11 items > close(con) > > Ts <- grep("^T", txt, value = TRUE) > Ts <- sub("T([[:digit:]]+)N([[:digit:]]+)",

Re: [R] barplot - change width of bar outline

2011-06-02 Thread Rolf Turner
On 03/06/11 10:26, CAB wrote: Dear R users I am modifying a column chart which I have created in R using barplot to make it clearer. I have been able to change the settings to increase the width of the axes lines and the text size but I cannot find the code to change the width of the lines which

Re: [R] Problem with package development

2011-06-02 Thread Nipesh Bajaj
This is how strange? How and from where I would know that I need to install something pdflatex separately? Can you point some legitimate link which says I need to install that (like Rtools?) Even this link 'http://www.math.rug.nl/~trentelman/jacob/pdflatex/pdflatex.html' do not provide any download

Re: [R] lattice panel fine control

2011-06-02 Thread Bert Gunter
You're still not reading the Help carefully/thoroughly. Check the entry under the "relation" subargument for the "scales" argument of xyplot. You need relation = "same", which is the default and so can be omitted. -- Bert On Thu, Jun 2, 2011 at 2:02 PM, maxbre wrote: > ok thanks again for your

Re: [R] (no subject)

2011-06-02 Thread Johannes Huesing
Ungku Akashah [Thu, Jun 02, 2011 at 10:31:53AM CEST]: > Error in lda.default(x, grouping, ...) : > variables 1 3 5 8 10 15 17 20 27 29 34 appear to be constant within > groups Please do read the posting guide before posing a question here. The message would have benefitted from a title. M

Re: [R] Plot cdf, pdf

2011-06-02 Thread nandan amar
try folllowing in general >?ecdf but what vector input consists of..?? On 3 June 2011 01:19, Alaios wrote: > 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 > > ___

Re: [R] Plotting Data Table

2011-06-02 Thread Santosh Srinivas
Hello cmaster1331, I had asked a similar question sometime back. You may want to check out these responses that I got. A) http://code.google.com/p/gridextra/wiki/tableGrob B) 1) latex (via xtable, Hmisc, r2lh, reporttools ...) 2) html (via xtable, r2lh, R2HTML, hwritter, HTMLUtils ...) 3) graphi

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

2011-06-02 Thread Greg Snow
Look at the logspline package for one approach to doing this. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of teriri Sent: Thursday, June 02, 2011 12:19 AM To: r-help@r-project.org Subject: [R] [Plea to the R Gods] Theoretical and E

Re: [R] heatmap question

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 4:08 PM, Mark Aquino wrote: Hi, I have what would seem to be a very simple problem but have been unable to find any way to go about solving it: I am using heatmap.2 to create a heatmap and by default the x axis label is at the bottom of the heatmap, I simply want to move

[R] power function using gnm()

2011-06-02 Thread natalia norden
Hi, I'm using the package gnm to perform non-linear models and I cannot find how to write the formula for a power function model. The equation is something like (1) y ~ A * x^B or (2)y ~ A * B^x. I guess it is using the nonlin function Mult(), but couldn't find how. Thank you for y

[R] barplot - change width of bar outline

2011-06-02 Thread CAB
Dear R users I am modifying a column chart which I have created in R using barplot to make it clearer. I have been able to change the settings to increase the width of the axes lines and the text size but I cannot find the code to change the width of the lines which create the bars/columns themselv

Re: [R] lattice panel fine control

2011-06-02 Thread maxbre
ok thanks again for your reply: this is what I worked out so far #start code xyplot(ped.avg ~ tv.avg | family, data=mydata, strip=strip.custom(bg='white'), col.line=1, main="title", xlab = expression(paste('tv [ fg/', m^3, ' ]', sep = '')),

[R] Plotting Data Table

2011-06-02 Thread cmaster1331
Hi all, So my question is pretty simple, but unfortunately I have not been able to find a good answer after extensive google searches. I am trying to plot an "attractive" data table in R, such as: http://t2.gstatic.com/images?q=tbn:ANd9GcRjfTbTEUWlnb73wtUkY1mbQblWA-2EKEgvTLXGzkqUSpH4mWrk Such d

[R] newton raphson

2011-06-02 Thread Jesper Hörnblad
Hi I would like to use the newton raphson method to find the root if the equation x^3-0.165*x+0.0003993 without using any readliy available program in r but instead by writing my own code and loop. the problem is that i really cant understand how to write the loop so that it keeps using the last

Re: [R] complex search between dataframes

2011-06-02 Thread Remko Duursma
Here is another solution, using apply() and lapply(). # list of sequences corresponding to each row in data1: seqlist <- apply(data1, 1, function(x)seq(from=x[1], to=x[2])) # Find which rows of data2 are inside those sequences: rowsInSeq<- unlist(lapply(seqlist , function(x)which(data2$position

[R] heatmap question

2011-06-02 Thread Mark Aquino
Hi, I have what would seem to be a very simple problem but have been unable to find any way to go about solving it: I am using heatmap.2 to create a heatmap and by default the x axis label is at the bottom of the heatmap, I simply want to move the label to the top of the heatmap. Any help with

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

2011-06-02 Thread teriri
Hello! Haha, I am not doing this for a class...just trying to teach myself a few things or two. Thank you both for the responses. I really appreciate it. -- View this message in context: http://r.789695.n4.nabble.com/Plea-to-the-R-Gods-Theoretical-and-Empirical-CDFs-tp3567636p3569609.html Sent f

[R] Constraining estimates for random effects

2011-06-02 Thread Henrik
I am using MuMIn and LME4 for model averaging. Does anyone know if there is a way to constrain the estimates of random effects to specific values? -- View this message in context: http://r.789695.n4.nabble.com/Constraining-estimates-for-random-effects-tp3569250p3569250.html Sent from the R he

[R] censorReg/survreg

2011-06-02 Thread Skevi Pericleous
Hi all, I would like to ask whether anyone knows if the censorReg in S-plus regress the mean survival model or the hazard and if it uses the maximum likelihood in order to estimate the values? In addition, is there anyone knowing why censorReg does not exist in R and what's the difference betwee

[R] generating random covariance matrices (with a uniform distribution of correlations)

2011-06-02 Thread Ned Dochtermann
List members, Via searches I've seen similar discussion of this topic but have not seen resolution of the particular issue I am experiencing. If my search on this topic failed, I apologize for the redundancy. I am attempting to generate random covariance matrices but would like the corresponding c

[R] Traversing KD-tree (or equivalent) for radius-based search

2011-06-02 Thread Andrea Taverna
Hi, I'm trying to implement the DBSCAN algorithm to get O(N*LogN) complexity and I'd need a spatial tree of some sort (kd,r,bd..), or a function that computes radius-based search on spatial data, i.e. given a radius eps finds ALL the points which fall in the corresponding hypersphere centered

[R] ragged data.frame? using plyr

2011-06-02 Thread Justin Haynes
I have a dataset that looks like: set.seed(144) sam<-sample(1000,100) dat<-data.frame(id=letters[1:10],value=rnorm(1000),day=c(rep(1,100),rep(2,100),rep(3,100),rep(4,100),rep(5,100))) I want to "normalise" it using the following function (unless you have a better idea...): adj.values<-function(

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

2011-06-02 Thread Duncan Murdoch
On 02/06/2011 5:03 PM, 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 Duncan Murdoch
On 02/06/2011 2:30 PM, Nipesh Bajaj wrote: 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. * Pu

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

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 th

Re: [R] Problem with package development

2011-06-02 Thread Joshua Wiley
On Thu, Jun 2, 2011 at 4:49 PM, Rolf Turner wrote: > On 03/06/11 11:33, Joshua Wiley wrote: >> >> Hi, >> >> On Thu, Jun 2, 2011 at 11:30 AM, Nipesh Bajaj >>  wrote: >>> >>> I editied the help page for fn1() function (as I already communicated >>> in previous mail) as follows: >>> \name{fn1} >>> \a

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 Bajaj 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. W

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 cruci

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

Re: [R] Problem with package development

2011-06-02 Thread Joshua Wiley
Hi, On Thu, Jun 2, 2011 at 11:30 AM, Nipesh Bajaj 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 makes you t

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

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

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 this

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 Peter Langfelder
On Thu, Jun 2, 2011 at 3: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 g

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 co

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=" bbb

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

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)) > data2<-data.frame(name=c(1,2,3,4,5,6,7,8,9),position=c(2,14,20,50,150,2000,2

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 wrote: > I have run R CMD check trial1 and saw an error. This says that: > > * chec

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

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 bbmle?

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

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

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

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

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

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.", "

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 o

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?

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

[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 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), list(

[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

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

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 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: > http://r.789695.n4.nabble.com/re-write-plot-function-for-

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 projec

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 no

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

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 ot

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

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( spe

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

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 f

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 h

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 fol

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 multidimension

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 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] 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 wrote: > Hello, > > following problem: > > i have a written my own function  to draw some sophisticated graphic, > which after manipulating data somewhere contains a plot comand > f

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 wrote: > Dear all... > > I am looking for the zip file of an old version of the ARM packa

[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

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

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 co

Re: [R] Latin Hypercube Sampling with a condition

2011-06-02 Thread Rob Carnell
Duarte Viana 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 is to

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

[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 : sqldf("SE

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

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

[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

[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

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 degree

  1   2   >