[R] how do i put two scatterplots on same graph

2011-10-03 Thread jricci
Have two sets of scatterplot data hypothetically a) stem lenght vs number of petals in red flowers b) stem lenght vs number of petals in white flowers want to place on same scatter plot with same x,y axis but different collored markers How do I do this in R -- View this message in context: ht

Re: [R] xts/time-series and plot questions...

2011-10-03 Thread Douglas Philips
On 2011 Oct 3, at 4:55 PM, Joshua Ulrich wrote: > ts requires a time-based index, so there's no way to make an index > "year-free". What you can do, is split the xts object into years, > convert all the index values to have the same year, and merge them > together. Ah... of course. I had read the

[R] how to make ARFIMA forecast by using r?

2011-10-03 Thread normah
please help.. I have estimate the value of parameter for AR,MA and fractional d.but I have problem on having the right command for forecasting ARFIMA model.please help.. -- View this message in context: http://r.789695.n4.nabble.com/how-to-make-ARFIMA-forecast-by-using-r-tp3869928p3869928.htm

Re: [R] how do i put two scatterplots on same graph

2011-10-03 Thread Daniel Malter
?plot ?points You will probably need to get some R basics down as to how to index certain subsets of your data. This you find in any introductory R manual. HTH, Daniel -- View this message in context: http://r.789695.n4.nabble.com/how-do-i-put-two-scatterplots-on-same-graph-tp3870030p3870074.ht

Re: [R] Matrix/Vector manipulation

2011-10-03 Thread fernando.cabrera
Stylish, but ifelse only includes a cumsum less or equal than v and ignores the remainder, if v does not fit equally in say the first two weight buckets. > R <- c(1.2, 1.3, 1.5) > W <- c(3,2,5) > my_cumsum(4, R, W) # should take 3*1.2 + 1*1.3 [1] 4.0 > sum(ifelse(cumsum(W) <= 4, W, 0) * R) # i

Re: [R] generating Venn diagram with 6 sets

2011-10-03 Thread peter dalgaard
On Oct 3, 2011, at 21:25 , Mao Jianfeng wrote: > Dear Peter, > > I am glad to hearing your reply. That is really nice. Thanks a lot. > > > ### > # (1) the problem of the plot venneuler generated me is sets (A,B,C,D,E,F) > should shared 69604 elements. > #

Re: [R] distance coefficient for amatrix with ngative valus

2011-10-03 Thread Rolf Turner
On 04/10/11 17:05, R. Michael Weylandt wrote: More importantly, as I said in my initial response, any distance metric worth its salt is translation invariant. Point of order, Mr. Chairman. (This is really *toadally* off topic; my apologies, but I couldn't resist --- I trained as a pure mat

Re: [R] The use of period in function names and variable names

2011-10-03 Thread Steve Lianoglou
Hi, On Tue, Oct 4, 2011 at 12:19 AM, Smart Guy wrote: > Hi, >     I am looking for some guidance on whether I can use the period(.) in > function names and variable names. Yes you can. > For example: > > my.function.name <- function(my.data.variable, my.radius, my.another.var, > my.value = 10)

[R] The use of period in function names and variable names

2011-10-03 Thread Smart Guy
Hi, I am looking for some guidance on whether I can use the period(.) in function names and variable names. For example: my.function.name <- function(my.data.variable, my.radius, my.another.var, my.value = 10) { } Will this pose any problems regarding older and current version of R. -- Sma

[R] inconsistent behavior of summary function

2011-10-03 Thread Jeanne M. Spicer
The summary function behaves inconsistently with data frame columns, e.g. summary(rock) #max of area 12212, correct summary(rock$area) #max of area 12210, incorrect max I know that summary(rock$area, digits=5) will correct the error (I DID read the manual). But my point is the inc

[R] cannot install.packages("data.table")

2011-10-03 Thread Emmanuel Mayssat
Hello, I am new at R. I am trying to see if R can work for me. I need to do database like lookup (select * from table where name=='toto') and work with matrix (transpose, add columns, remove rows, etc). It seems that the data.table package can help. http://rwiki.sciviews.org/doku.php?id=packages:c

[R] Quasi-Binomial simulation

2011-10-03 Thread saber fallahpour
Hi I want to do simulation on quasi-binomial distribution with some covariates. Does anyone have an idea how to do that? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] rolling regression

2011-10-03 Thread Darius H
Hi Michael, Many thanks for your reply. I am handicapped in 2 different areas; firstly R and most importantly statistical concepts! May I ask you to expand on the 2nd paragraph of your reply below. I was originally using dynlm but then changed back to lm to avoid complication. Also, wha

Re: [R] read .csv from web from password protected site

2011-10-03 Thread Mike Pfeiff
Yes, I meant to reply to all (sorry still new at asking for help) 1. No, I am not able to open the file when I insert "userID:password@" between "http://"; and "www" http://userid:passw...@www.frontierweather.com/degreedays/L15N15PowerRegionAverages_10weeks.txt (replacing useri

[R] Efficient way to do a merge in R

2011-10-03 Thread Aurélien PHILIPPOT
Dear all, I am new in R and I have been faced with the following problem, that slows me down a lot. I am short of ideas to circumvent it. So, any help would be highly appreciated: I have 2 dataframes x and y. x is very big (70 million observations), whereas y is smaller (30 observations). Al

Re: [R] Import in R with White Spaces

2011-10-03 Thread Tyler Rinker
I use the following function I stole somewhere. There's probably better ways. white <- function(x){ x <- as.data.frame(x) W <- function(x) gsub(" +", "", x) sapply(x,W) } #EXAPLE dat <- paste(letters," ", " ", LETTERS) (DAT <- data.frame(dat, dat)) #nasty white spaces white(DAT) #white spa

Re: [R] Question about ggplot2 and stat_smooth

2011-10-03 Thread Andrés Aragón
Hi, Try some like this: c <- ggplot(mtcars, aes(qsec, mpg, colour=factor(cyl))) c + stat_smooth(aes(group=cyl))+stat_smooth(aes(fill=factor(cyl)))+geom_point() Andrés AM 2011/10/3, Thomas Adams : > I'm interested in creating a graphic -like- this: > > c <- ggplot(mtcars, aes(qsec, wt)) > c

Re: [R] ROC plot for KNN

2011-10-03 Thread AHmed
Qian Liu gmail.com> writes: > > Hi I need some help with ploting the ROC for K-nearest neighbors. Since KNN > is a non-parametric classification methods, the predicted value will be > either 0 or 1. > It will not be able to test for different cutoff to plot ROC. What is the > package or functio

Re: [R] distance coefficient for amatrix with ngative valus

2011-10-03 Thread R. Michael Weylandt
Comments inline: On Mon, Oct 3, 2011 at 11:27 PM, dilshan benaragama wrote: > Yes I think you did not get my problem. No, you did not state your problem. I have replied to everything you have actually included to this point. Admittedly, I have failed to reply to things you did not say... > Act

Re: [R] distance coefficient for amatrix with ngative valus

2011-10-03 Thread R. Michael Weylandt
You still haven't explained what's wrong with *almost every metric there is*, but if you want other distance metrics have you considered those in the package you are using, via the function dsvdis(). Consider, for example: library(labdsv) X <- get(data(bryceveg)); X[, sample(NROW(X))] <- (-1)*X[

Re: [R] Hi

2011-10-03 Thread chunjiang he
thanks On Fri, Sep 30, 2011 at 5:25 PM, Francois Pepin < francois.pe...@sequentainc.com> wrote: > Hi Jiang, > > where did you get that definition of the Benjamini-Hochberg correction? > That is simply not how it works. You can take a look at the original paper, > it is available online ( > http:/

[R] a question about sort and BH

2011-10-03 Thread chunjiang he
Hi, I have two questions want to ask. 1. If I have a matrix like this, and I want to figure out the rows whose value in the 3rd column are less than 0.05. How can I do it with R. hsa-let-7a--MBTD10.5282391972.41E-05 hsa-let-7a--APOBEC10.5078694095.51E-05 hsa-let-7a--PAPOLA0.47

Re: [R] new standardised variable based on group membership

2011-10-03 Thread John.Morrongiello
I like that one too Baptiste, thanks -Original Message- From: baptiste auguie [mailto:baptiste.aug...@googlemail.com] Sent: Tuesday, 4 October 2011 9:56 AM To: Morrongiello, John (CMAR, Hobart) Cc: thierry.onkel...@inbo.be; r-help@r-project.org Subject: Re: [R] new standardised variable b

Re: [R] new standardised variable based on group membership

2011-10-03 Thread baptiste auguie
More concisely, ddply(Orange, .(Tree), transform, scaled = scale(age)) HTH, baptiste On 4 October 2011 11:24, wrote: > That works a treat Thierry, thanks! I wasn't aware of the plyr package but I > like what it does- I'll put it to use work in the future. > > Regards > > John > > -Origin

Re: [R] new standardised variable based on group membership

2011-10-03 Thread John.Morrongiello
That works a treat Thierry, thanks! I wasn't aware of the plyr package but I like what it does- I'll put it to use work in the future. Regards John -Original Message- From: ONKELINX, Thierry [mailto:thierry.onkel...@inbo.be] Sent: Monday, 3 October 2011 6:36 PM To: Morrongiello, John

Re: [R] xts/time-series and plot questions...

2011-10-03 Thread Joshua Ulrich
Hi Doug, Thanks for taking the time to write a great question. On Mon, Oct 3, 2011 at 12:23 PM, Douglas Philips wrote: > Hello, >  I'm a complete newbie to R. Spent this past weekend reading The Art of R > Programming, The R Cookbook, the language spec, Wikis and FAQs. I sort-of > have my head

Re: [R] distance coefficient for amatrix with ngative valus

2011-10-03 Thread R. Michael Weylandt
One order of the usual coming right up! 1 course of "Why does XXX not work for you?" a la francaise, where XXX is, in your case, the Euclidean distance. Specifically, any metric worth its salt (in a normed space) satisfies dist(a,b) = dist(a+c,b+c) so why are negative values a problem?... 2 side

Re: [R] Parsing variable-length delimited strings into a matrix

2011-10-03 Thread R. Michael Weylandt
Well how do you want it be made into a matrix if the rows are all different lengths? Methinks you are finding this tricky for a reason... Michael On Mon, Oct 3, 2011 at 11:40 AM, Benjamin Wright wrote: > > I'm struggling to find a way of parsing a vector of data in this sort of form: > > A,B,C >

Re: [R] file input with readLines

2011-10-03 Thread R. Michael Weylandt
If you are using rbind() at each iteration, that can slow things down greatly. Look up a document called the R Inferno which discusses this in great detail in circle 2. Michael Weylandt On Mon, Oct 3, 2011 at 2:26 PM, Cable, Sam B Civ USAF AFMC AFRL/RVBXI wrote: > More on my previous question ..

Re: [R] Returning vector of values shared across 3 vectors?

2011-10-03 Thread Brian Diggs
On 10/1/2011 3:03 AM, jim holtman wrote: try this: vec1<- c(4,5,6,7,8,9,10,11,12,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81) vec2<- c (1,2,3,4,5,6,7,8,9,10,11,12,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,

Re: [R] read .csv from web from password protected site

2011-10-03 Thread Sarah Goslee
Hi, I've assumed that you meant to send this to the R-help list, and not just me. On Mon, Oct 3, 2011 at 3:54 PM, Mike Pfeiff wrote: > Sarah,  Thanks for the suggestion.  Although, > read.table("http://userid:passw...@my.url/file.csv";) did not work as it > returned the following: > >        E

Re: [R] suggestions argument in rbga function in genalg package

2011-10-03 Thread Joseph Boyer
Enrico, The idea of looking at the code never occurred to me. That's a great idea which will come in useful I'm sure. In this particular case the using list() or as.matrix() does not solve the problem, but those are both good ideas. Thanks for the reply. -Original Message- From: Enric

Re: [R] Compact letter display for interaction effects

2011-10-03 Thread Spencer Graves
library(sos) cl <- ???'compact letter display' cl This opened a table for me in a web browser identifying 3 help pages in 'multcomp' and 1 in 'multcompView' that mention 'compact letter display'. Functions in multcompView will work anything that looks like a distance or similarity

Re: [R] Question about ggplot2 and stat_smooth

2011-10-03 Thread Thomas Adams
Andrés, Thank you for your help, but that does not capture what I'm looking for. I need to be able to control the shaded bound limits and they need to be coincident. Tom On 10/3/11 3:37 PM, Andrés Aragón wrote: Hi, Try some like this: c<- ggplot(mtcars, aes(qsec, mpg, colour=factor(cyl)))

Re: [R] Import in R with White Spaces

2011-10-03 Thread Sarah Goslee
Hi, On Mon, Oct 3, 2011 at 11:14 AM, francy wrote: > Hi, > > I have a simple question about importing data, I would be very grateful if > you could help me out. > > I have used read.csv(file name, header=T, sep=",") to bring in a csv file I > saved in MS Excel.The problem is I have white spaces i

Re: [R] read .csv from web from password protected site

2011-10-03 Thread Sarah Goslee
Hi Mike, On Mon, Oct 3, 2011 at 12:31 PM, Mike Pfeiff wrote: > I am very new to R and have been struggling trying to read a basic ".csv" > file from a password protected site with the following code: > > myURL   > ="http://www.frontierweather.com/degreedays/L15N15PowerRegionAverages_10weeks.txt"

Re: [R] Merge two data frames and find common values and non-matching values

2011-10-03 Thread Sarah Goslee
Hi, On Mon, Oct 3, 2011 at 1:54 PM, francy wrote: > Hi, > > I am trying to find a function to match two data frames of different lengths > for one field only. > So, for example, > df1 is: > > Name Position location > francesca A 75 > cristina B 36 > > And df2 is: > > location Country > 75 UK > 5

Re: [R] Merge two data frames and find common values and non-matching values

2011-10-03 Thread William Dunlap
Start out with merge(): > df <- merge(df1, df2, all.x=TRUE) # could add by="location" for emphasis > df location Name Position Country 1 36 cristinaB 2 75 francescaA UK You could make make your 'Match' column from is.na(df$Country) if you knew

Re: [R] generating Venn diagram with 6 sets

2011-10-03 Thread Mao Jianfeng
Dear Peter, I am glad to hearing your reply. That is really nice. Thanks a lot. ### # (1) the problem of the plot venneuler generated me is sets (A,B,C,D,E,F) should shared 69604 elements. # But, it illustrated nothing for me for this 6 sets sharing. >

Re: [R] Meta-analysis of test statistics in "metafor" package?

2011-10-03 Thread Kevin E. Thorpe
On 10/03/2011 01:07 PM, davidyeager wrote: Hi - I am conducting a meta-analysis and I have a matrix of f-statistics, Ns and dfs from a series of studies that tested for an interaction in a 2x2 anova. I'd like to test whether the 2x2 interaction is significant in the aggregate. Similarly, I have

Re: [R] file input with readLines

2011-10-03 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
More on my previous question ... I have put in timing statements to try to get a better idea of where the problem is, like so: conn<-file('filename','r') for (chunk in 1:10) { print(paste('begin read at',date())) Lines<-readLines(conn,n=25) print(paste('begin processing at',date()))

[R] Merge two data frames and find common values and non-matching values

2011-10-03 Thread francy
Hi, I am trying to find a function to match two data frames of different lengths for one field only. So, for example, df1 is: Name Position location francesca A 75 cristina B 36 And df2 is: location Country 75 UK 56 Austria And I would like to match on "Location" and the output to be something

[R] read .csv from web from password protected site

2011-10-03 Thread Mike Pfeiff
I am very new to R and have been struggling trying to read a basic ".csv" file from a password protected site with the following code: myURL ="http://www.frontierweather.com/degreedays/L15N15PowerRegionAverages_10weeks.txt"; test2=read.table(url(myURL),header=TRUE,sep=",") A 'data.frame' is re

[R] Installation from local Compiled directory

2011-10-03 Thread Sandeep Patil
Hello everyone I have manually compiled directory of gstat in a particular folder of my Unix system. I want to install this and am unable to use either of the following two commands 1. R CMD INSTALL 2. Install.packages I do not understand how to coax above commands to locate the directory that i

[R] Parsing variable-length delimited strings into a matrix

2011-10-03 Thread Benjamin Wright
I'm struggling to find a way of parsing a vector of data in this sort of form: A,B,C B,B A,AA,C A,B,BB,BBB,B,B into a matrix (or data frame). The catch is that I don't know a priori how many entries there will be in each element, nor how many characters there will be. strsplit(vec,",") gets me

Re: [R] intensity map / plot

2011-10-03 Thread Martin Batholdy
thanks! On 03.10.2011, at 19:11, Uwe Ligges wrote: > See ?image > > Uwe Ligges > > > On 03.10.2011 19:05, Martin Batholdy wrote: >> Dear R-list, >> >> >> I would like to generate an intensity map based on a x * y matrix. >> >> Each point in the matrix should get plotted at the coordinate:

[R] file input with readLines

2011-10-03 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
I am using readLines to read a fairly large ASCII file. readLines reads a fixed number of lines, then other R code processes the data, then readLines reads the same number of lines again, then other R code processes the data, then Sort of like: conn<-file('filename','r') for (chunk i

[R] Online Course PLS and R and free, public videos

2011-10-03 Thread Geoffrey Hubona
The Georgia R School (http://georgia-r-school.org) is a non-profit educational organization. With faculty from Virginia Commonwealth University, we are conducting live, interactive, synchronous month-long online courses on PLS path modeling and R statistical software during October and November. A

[R] Meta-analysis of test statistics in "metafor" package?

2011-10-03 Thread davidyeager
Hi - I am conducting a meta-analysis and I have a matrix of f-statistics, Ns and dfs from a series of studies that tested for an interaction in a 2x2 anova. I'd like to test whether the 2x2 interaction is significant in the aggregate. Similarly, I have a matrix of chi-square statistics that I'

[R] Import in R with White Spaces

2011-10-03 Thread francy
Hi, I have a simple question about importing data, I would be very grateful if you could help me out. I have used read.csv(file name, header=T, sep=",") to bring in a csv file I saved in MS Excel.The problem is I have white spaces in the middle of values (not in the column names), and this messes

[R] minimisation problem, two setups (nonlinear with equality constraints/linear programming with mixed constraints)

2011-10-03 Thread Liu Evans, Gareth
Dear All, Thank you for the replies to my first thread here: http://r.789695.n4.nabble.com/global-optimisation-with-inequality-constraints-td3799258.html. So far the best result is achieved via a penalised objective function. This was suggested by someone on this list privately. I am still l

[R] Compact letter display for interaction effects

2011-10-03 Thread Josh Caplan
Hello, I am interested in generating a compact letter display for the results of Tukey HSD tests that contain interaction effects. The 'cld' method in the 'multcomp' package seems only to work for main effects. Does such a thing exist already? Thank you for any thoughts, Josh -- Joshua Capl

[R] distance coefficient for amatrix with ngative valus

2011-10-03 Thread dilshan benaragama
Hi, I need to run a PCoA (PCO) for a data set wich has both positive and negative values for variables. I  could not find any distancecoefficient other than euclidean distace running for the data set. Are there any other coefficient works with negtive values.Also I cannot get summary out put (th

[R] xts/time-series and plot questions...

2011-10-03 Thread Douglas Philips
Hello, I'm a complete newbie to R. Spent this past weekend reading The Art of R Programming, The R Cookbook, the language spec, Wikis and FAQs. I sort-of have my head around R; the dizzying selection of libraries, packages, etc? Not really. I've probably missed or failed to understand somethin

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread Duncan Murdoch
Your subject line says Windows, but your error message suggests MacOS. I think you need to post questions that are answerable if you want an answer. Duncan Murdoch On 03/10/2011 12:48 PM, syrvn wrote: Hi Duncan, you were right. texi2dvi does latex + bibtex. Unfortunately I cannot get it run

Re: [R] Question about ggplot2 and stat_smooth

2011-10-03 Thread Dennis Murphy
Hi: I would think that, at least in principle, this should work: a <- ggplot(mtcars, aes(qsec, wt)) a + geom_point() + stat_smooth(fill="blue", colour="darkblue", size=2, level = 0.9, alpha = 0.2) + stat_smooth(fill = 'blue', colour = 'darkblue', size = 2,

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread syrvn
Hi, I know now why it did not work. See here: http://www.mail-archive.com/r-help@r-project.org/msg19682.html I started R via the terminal with open -a R and then called the script again as well as the texi2dvi function. Both worked. The problem now is I use R within Eclipse and I don't know how

Re: [R] generating Venn diagram with 6 sets

2011-10-03 Thread peter dalgaard
On Oct 2, 2011, at 18:25 , Mao Jianfeng wrote: > But, vennerable can not be installed on my Mac book. Works for me. What are the symptoms? -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: p

[R] Question about ggplot2 and stat_smooth

2011-10-03 Thread Thomas Adams
I'm interested in creating a graphic -like- this: c <- ggplot(mtcars, aes(qsec, wt)) c + geom_point() + stat_smooth(fill="blue", colour="darkblue", size=2, alpha = 0.2) but I need to show 2 sets of bands (with different shading) using 5%, 25%, 75%, 95% limits that I specify and where the hea

Re: [R] about the array transpose

2011-10-03 Thread R. Michael Weylandt
Mr. Disease, As Uwe points out, the syntax is pretty clear, but it is perhaps worth mulling over why: R> identical(A[,,1], t(B[1,,])) TRUE to confirm that you understand the function. Michael Weylandt PS -- Might I suggest, if you insist on anonymity, a different handle? I'm answering on my lu

Re: [R] rolling regression

2011-10-03 Thread R. Michael Weylandt
It seems you don't really know how predict works. If you don't supply new data, it will only return the least squares fit to the old data, which is the large data block you saw. Check the first example given in ?predict to see how this works for new (out of sample) data. More importantly, use of l

Re: [R] about the array transpose

2011-10-03 Thread Uwe Ligges
On 03.10.2011 03:29, venerealdisease wrote: Hi, all, I am a newbie for [R] Would anyone help me how to transpose a 3x3x3 array for 1:27 Eg. A<-array(1:27, c(3,3,3) What is the logic to transpose it to B<-aperm(A, c(3,2,1)) It simply says third dimension first, second second, and first thir

Re: [R] intensity map / plot

2011-10-03 Thread Uwe Ligges
See ?image Uwe Ligges On 03.10.2011 19:05, Martin Batholdy wrote: Dear R-list, I would like to generate an intensity map based on a x * y matrix. Each point in the matrix should get plotted at the coordinate: x = column / y = row with a color-intensity (for example gray-value) based on the

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread syrvn
I am a bit confused... I wrote a little shell script called tex2pdf which just calls: texi2pdf body.tex and when I execute it in a terminal it runs smoothly. If I type into R: system("/Path/to/tex2pdf") I get the same error message: You don't have a working TeX binary (tex) installed anywhere in

[R] intensity map / plot

2011-10-03 Thread Martin Batholdy
Dear R-list, I would like to generate an intensity map based on a x * y matrix. Each point in the matrix should get plotted at the coordinate: x = column / y = row with a color-intensity (for example gray-value) based on the actual value of this point. Is there a convenient package / functio

Re: [R] Best method to add unit information to dataframe ?

2011-10-03 Thread Gabor Grothendieck
On Mon, Oct 3, 2011 at 10:35 AM, bruno Piguet wrote: > Dear all, > >  I'd like to have a dataframe store information about the units of > the data it contains. > >  You'll find below a minimal exemple of the way I do, so far. I add a > "units" attribute to the dataframe. But  I dont' like the long

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread syrvn
Hi Duncan, you were right. texi2dvi does latex + bibtex. Unfortunately I cannot get it running. When I run texi2dvi(file = "path/to/tex/file", pdf=TRUE, quiet=FALSE) then I get the following error message: ___ Error in texi2

Re: [R] Best method to add unit information to dataframe ?

2011-10-03 Thread Steve Lianoglou
Hi, If you want to take advantage of Josh's example below (using an S4 subclass of data.frame), perhaps you might be interested in taking advantage of the multitude of useful objects/classes defined in the bioconductor IRanges package: http://www.bioconductor.org/packages/release/bioc/html/IRange

Re: [R] Assigning factor names to interaction plot

2011-10-03 Thread Dennis Murphy
Hi: A small toy example: fakedata <- data.frame(group = factor(rep(1:3, each = 10), labels = paste('Therapy', 1:3)), city = factor(rep(c('Amsterdam', 'Rotterdam'), each = 5)), pressure = rnorm(30)) with(fakedata, interaction.plot(group, city, pressure, t

Re: [R] getting list of data.frame names

2011-10-03 Thread David Reiner
I know you already got a good answer from Joshua Wiley. Here is a function I find useful. Anyone who wants to suggest improvements, please do so! > my.ls function(pos=1, sorted=FALSE, mode, class){ .result <- sapply(ls(pos=pos, all.names=TRUE), function(..x)object.size(eval(as.symbol(..x

Re: [R] Best method to add unit information to dataframe ?

2011-10-03 Thread Bert Gunter
Alternatively, you can make a separate S3 class for a data frame with this attribute -- and then have appropriate, print, plot, etc. methods that access it. That way, your messy syntax has to be written only once in the method functions. -- Bert On Mon, Oct 3, 2011 at 8:15 AM, Joshua Wiley wrot

Re: [R] how to get old packages to work on R 2.12.1

2011-10-03 Thread Joseph Boyer
That works great. Thanks, Rich. From: Richard M. Heiberger [mailto:r...@temple.edu] Sent: Wednesday, September 28, 2011 1:13 PM To: Joseph Boyer Cc: r-help@r-project.org Subject: Re: [R] how to get old packages to work on R 2.12.1 Joe, Most firewall issues can be resolved by entering setIntern

Re: [R] Matrix/Vector manipulation

2011-10-03 Thread David Reiner
sum(ifelse(cumsum(W)<=v, W, 0) * R) HTH, David L. Reiner -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of fernando.cabr...@nordea.com Sent: Monday, October 03, 2011 9:50 AM To: r-help@r-project.org Subject: [SPAM] - [R] Matrix/Vect

Re: [R] difference between createPartition and createfold functions

2011-10-03 Thread Max Kuhn
No, it is an argument to createFolds. Type ?createFolds to see the appropriate syntax: "returnTrain a logical. When true, the values returned are the sample positions corresponding to the data used during training. This argument only works in conjunction with list = TRUE" On Mon, Oct 3, 20

Re: [R] Best method to add unit information to dataframe ?

2011-10-03 Thread Joshua Wiley
Hi Bruno, It sounds like what you want is really a separate class, one that has stores information about units for each variable. This is far from an elegant example, but depending on your situation may be useful. I create a new class inheriting from the data frame class. This is likely fraught

Re: [R] difference between createPartition and createfold functions

2011-10-03 Thread bby2103
Hi Max, Thanks for the note. In your last paragraph, did you mean "in createDataPartition"? I'm a little vague about what returnTrain option does. Bonnie Quoting Max Kuhn : Basically, createDataPartition is used when you need to make one or more simple two-way splits of your data. For ex

Re: [R] Sorting data in R according to the header of another table

2011-10-03 Thread R. Michael Weylandt
Try this: X = 1:5; names(X) = letters[sample(5)] Y = matrix(1:25, 5); colnames(Y) = letters[1:5] Y[ , names(X)] Hope this helps, Michael Weylandt On Oct 3, 2011, at 6:20 AM, "Samir Benzerfa" wrote: > Hi everyone, > > > > My (simplified) problem is the following one: I have two tables. The

Re: [R] Best method to add unit information to dataframe ?

2011-10-03 Thread Marc Schwartz
On Oct 3, 2011, at 9:35 AM, bruno Piguet wrote: > Dear all, > > I'd like to have a dataframe store information about the units of > the data it contains. > > You'll find below a minimal exemple of the way I do, so far. I add a > "units" attribute to the dataframe. But I dont' like the long s

Re: [R] Find all duplicate records

2011-10-03 Thread Erik Svensson
It works, thanks a lot Gabor Erik -- View this message in context: http://r.789695.n4.nabble.com/Find-all-duplicate-records-tp3865139p3867724.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://sta

Re: [R] Keep ALL duplicate records

2011-10-03 Thread Erik Svensson
It worked, thank you Jim Erik -- View this message in context: http://r.789695.n4.nabble.com/Keep-ALL-duplicate-records-tp3865136p3867709.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.et

[R] Matrix/Vector manipulation

2011-10-03 Thread fernando.cabrera
Hi guys, Have the following problem computing vectors with pure vector algebra and end up reverting to recursion or for-looping. Function my_cumsum calculates a weighted average (W) of ratios (R), but only up to the given size/volume (v). Now I recurse into the vector (from left to right) wit

[R] Best method to add unit information to dataframe ?

2011-10-03 Thread bruno Piguet
Dear all, I'd like to have a dataframe store information about the units of the data it contains. You'll find below a minimal exemple of the way I do, so far. I add a "units" attribute to the dataframe. But I dont' like the long syntax needed to access to the unit of a given variable (namely

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread Duncan Murdoch
On 03/10/2011 10:12 AM, syrvn wrote: Hello, I have exactly the same problem that bibtex is not being called and so the bibliography is not being processed... Did you find any solution for that? That sounds like a StatET question. You should get bibtex if you run R CMD texi2dvi --pdf (or R

[R] stl-decomposition with missing season

2011-10-03 Thread Martin B.
Dear all, I have a time series with a frequency of 10 days (so 36 yearly). one year is completely NA. Now I want to do a stl-decomposition, but using e.g. na.action= na.approx makes no sense for a whole year, of course. Is there a way of simulating this single year or to just make stl not using t

[R] Assigning factor names to interaction plot

2011-10-03 Thread flokke
Hi everyone, I have the following problem: I have three variables, 'group', 'city' and 'pressure' There is an interaction effect between group and city and I'd like to show this in an interaction plot: interaction.plot(group, city, pressure, type="b", col= c(1:2),

Re: [R] How to format Rsuperscript 2 followed by = value

2011-10-03 Thread sina.r
Hi Nevil, the function bquote() should do what you want: (found here: http://r.789695.n4.nabble.com/expression-td904189.html) mtext(bquote(R^2==.(round(summary(mylm)$r.squared,3))),1) Regards, Sina Rüeger -- View this message in context: http://r.789695.n4.nabble.com/How-to-format-Rsuperscript

[R] Sorting data in R according to the header of another table

2011-10-03 Thread Samir Benzerfa
Hi everyone, My (simplified) problem is the following one: I have two tables. The first table contains 5 columns with 5 values and the second table contains a single value for each vector name of the first table (see tables below): Table 1: A B C D

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread syrvn
Hello, I have exactly the same problem that bibtex is not being called and so the bibliography is not being processed... Did you find any solution for that? Many thanks syrvn -- View this message in context: http://r.789695.n4.nabble.com/How-to-run-Bibtex-with-pdfLatex-in-StatEt-MikTex-on-Wind

[R] survexp with large dataframes

2011-10-03 Thread Terry Therneau
I've re-looked at survexp with the question of efficiency. As it stands, the code will have 3-4 (I think it's 4) active copies of the X matrix at one point; this is likely the reason it takes so much memory when you have a large data set. Some of this is history; key parts of the code were writt

Re: [R] Unable to load local library via GUI

2011-10-03 Thread Ben Bolker
Noel Faux unimelb.edu.au> writes: > > Hi all, > > Not sure if this is the best list, please point me to a more appropriate list if necessary. > > Running Mac OSX 10.7.1 > R version 2.13.1 Patched (2011-08-14 r56741) > Copyright (C) 2011 The R Foundation for Statistical Computing > ISBN 3-90005

Re: [R] New random number generator (RNG)

2011-10-03 Thread Ben Bolker
dataguru gmail.com> writes: > Based on very fast converging series for special transcendental > numbers. Is there some R code available? > > See details about the RNG at > http://www.analyticbridge.com/profiles/blogs/new-state-of-the-art- > random-number-generator-simple-strong-and-fa (Broken

Re: [R] extracting p-values in scientific notation

2011-10-03 Thread Erich Neuwirth
format.pval is documented and accessible from outside of base. So you do not have to qualify it as base::format.pval On 10/3/2011 11:24 AM, Liviu Andronic wrote: > Thanks all for your pointers. The following does trick: >> base::format.pval(x$p.value) ##Hmisc also has such a function > [1] "<2e-1

Re: [R] Interaction plot type=o

2011-10-03 Thread Gavin Simpson
On Fri, 2011-09-30 at 12:33 -0400, David Winsemius wrote: > On Sep 30, 2011, at 2:16 AM, Petr PIKAL wrote: > > >> > >> David, > >> thank you for your reply > >> > >> I tried this > >> attach(mtcars) > >> interaction.plot(cyl, gear, mpg, type="o", pch=5:8, lty=1 ) > >> > >> but I got this error: >

Re: [R] Help with cast/reshape

2011-10-03 Thread Petr PIKAL
Hi > > I realize that this is terribly basic, but I just don't seem to see it at > this moment, so I would very much appreciate your help. > > > How shall I transform this dataframe: > > > df1 > Name Index Value > 1a 1 0.1 > 2a 2 0.2 > 3a 3 0.3 > 4a 4

Re: [R] extracting p-values in scientific notation

2011-10-03 Thread Liviu Andronic
Thanks all for your pointers. The following does trick: > base::format.pval(x$p.value) ##Hmisc also has such a function [1] "<2e-16" On Mon, Oct 3, 2011 at 10:25 AM, Rolf Turner wrote: > Isn't it true that 0 < 2.2e-16? > Yes, but it doesn't mean that the p-value actually hits absolute zero. An

Re: [R] open source editor for r for beginners

2011-10-03 Thread Marion Wenty
dear users, sorry for the late reply! thank you all very much for your input. i think for now i will try rstudio which was recommended most and later on i will start learning vim or emacs. it was very interesting to read about your experiences. thanx! marion 2011/9/20 Ken Hutchison > Rstudio and

Re: [R] ggplot2 - extracting values of smooth

2011-10-03 Thread Paul Hiemstra
On 09/30/2011 04:39 PM, dM/ wrote: > Suppose that I'm working on Hadley's diamond dataset and I want to > review the relationship between price, colour and carat. > > I might run the following: > > library(ggplot2) > > #plot scatter and add some hex binning > q<-qplot(carat,price,data=diamonds

Re: [R] ggplot2 - extracting values of smooth

2011-10-03 Thread Paul Hiemstra
On 09/30/2011 04:39 PM, dM/ wrote: > Suppose that I'm working on Hadley's diamond dataset and I want to > review the relationship between price, colour and carat. > > I might run the following: > > library(ggplot2) > > #plot scatter and add some hex binning > q<-qplot(carat,price,data=diamonds

Re: [R] extracting p-values in scientific notation

2011-10-03 Thread Ted Harding
One point to note, for information, in this discussion is that cor.test() has apparently returned the P-value as an exact zero: x$p.value == 0 # [1] TRUE identical(x$p.value, 0) # [1] TRUE (which, by the way, I was led to after trying log10(x$p.value) and getting -Inf). Perhaps a more in

Re: [R] patients.txt data

2011-10-03 Thread Paul Hiemstra
On 10/02/2011 08:00 PM, Nadine Melhem wrote: > please send me the "patients.txt" data. > > thanks. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/post

  1   2   >