[R] New random number generator (RNG)

2011-10-03 Thread dataguru
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 __

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

2011-10-03 Thread Nevil Amos
I am trying to put an R2 value with R2 formatted with a superscript 2 followed by = and the value : the first mtext prints the R2 correctly formatted but follows it with =round(summary(mylm)$r.squared,3))) as text the second prints R^2 = followed by the value of

[R] Unable to load local library via GUI

2011-10-03 Thread Noel Faux
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-900051-07-0 Platform: x86_64-apple-darwin9.8.0/x86_64

[R] new standardised variable based on group membership

2011-10-03 Thread John.Morrongiello
Hi I have a data comprised of repeated measures of growth (5-15 records per individual) for 580 fish (similar to Orange dataset from nlme library). I would like to standardise these growth measures (yi – ŷ/sd) using mean and standard deviation unique to each fish. Can someone suggest a

Re: [R] deSolve - Function daspk on DAE system - Error (Vince)

2011-10-03 Thread Soetaert, Karline
Vince, When that happens, one possible reason is that your DAE is of index 1, which cannot be solved by daspk. The solver radau, also from deSolve can handle DAEs up to index 3, but you need to rewrite the problem in the form M*y' = f(x,y), where M is a mass matrix. If you do that for your

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

2011-10-03 Thread ONKELINX, Thierry
Dear John, You need to combine scale with a grouping function. data(Orange) library(plyr) Orange - ddply(Orange, .(Tree), function(x){ x$ddplyAge - scale(x$age)[, 1] x }) Orange$aveAge - ave(Orange$age, by = Orange$Tree, FUN = scale) all.equal(Orange$ddplyAge, Orange$aveAge)

Re: [R] Understanding the workflow between sweave, R and Latex

2011-10-03 Thread Liviu Andronic
On Fri, Sep 30, 2011 at 2:41 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: As an aside, I don't recommend the workflow you describe:  it's very slow and cumbersome.  It's much better to tell your text editor how to run both Sweave and Latex in one command.  In the upcoming release of R

[R] extracting p-values in scientific notation

2011-10-03 Thread Liviu Andronic
Dear all How does print.htest display the p-value in scientific notation? (x - cor.test(iris[[1]], iris[[3]])) Pearson's product-moment correlation data: iris[[1]] and iris[[3]] t = 21.65, df = 148, p-value 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent

Re: [R] Gstat - Installation Fail _ download source and compile help ...

2011-10-03 Thread Paul Hiemstra
Hi Sandeep, You need to provide way more detail for us to be able to help you: - Which version of gstat do you want to install, ? - where did you get the sources, ? - is it the version inside R or the standalone version? - what version of R are you running? - *what is the exact error that gstat

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

2011-10-03 Thread Rolf Turner
Isn't it true that 0 2.2e-16? cheers, Rolf Turner On 03/10/11 20:53, Liviu Andronic wrote: Dear all How does print.htest display the p-value in scientific notation? (x- cor.test(iris[[1]], iris[[3]])) Pearson's product-moment correlation data: iris[[1]] and iris[[3]]

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

2011-10-03 Thread Kenn Konstabel
is(x) [1] htest # take a look at stats:::print.htest format.pval(x$p.value) [1] 2.22e-16 Does that answer your question? KK On Mon, Oct 3, 2011 at 10:53 AM, Liviu Andronic landronim...@gmail.com wrote: Dear all How does print.htest display the p-value in scientific notation? (x -

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

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

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

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 rolf.tur...@xtra.co.nz wrote: Isn't it true that 0 2.2e-16? Yes, but it doesn't mean that the p-value actually hits

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 0.4 5b

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: Error in match.arg(type) :

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

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

2011-10-03 Thread Ben Bolker
dataguru datashaping at 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

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

2011-10-03 Thread Ben Bolker
Noel Faux nfaux at 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

[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

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:

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

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

[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

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

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

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

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

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 syntax

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

2011-10-03 Thread R. Michael Weylandt michael.weyla...@gmail.com
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 benze...@gmx.ch wrote: Hi everyone, My (simplified) problem is the following one: I have two

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 mxk...@gmail.com: Basically, createDataPartition is used when you need to make one or more simple two-way splits of

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

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,

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]

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

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

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

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,

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:

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

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 bruno.pig...@gmail.com 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'

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

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

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

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

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

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

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

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:

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

[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

[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

[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

[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

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

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

[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

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: x = column / y

[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

[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

[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

[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

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

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

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] 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 cristinaBNA 2 75 francescaA UK You could make make your 'Match' column from is.na(df$Country) if you knew

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 francy.casal...@gmail.com 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

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 mi...@kfoc.net 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  

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 francy.casal...@gmail.com 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

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

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 mi...@kfoc.net wrote: Sarah,  Thanks for the suggestion.  Although, read.table(http://userid:passw...@my.url/file.csv;) did not work as it returned the following:  

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

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 sam.ca...@kirtland.af.mil wrote: More

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 bj...@well.ox.ac.uk wrote: I'm struggling to find a way of parsing a vector of data in this sort of

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

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 d...@mac.com 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

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] 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, john.morrongie...@csiro.au 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

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

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

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 (

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] 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 benaraga...@yahoo.com 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

Re: [R] ROC plot for KNN

2011-10-03 Thread AHmed
Qian Liu littleduck24 at 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

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 spaces gone

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 thomas.ad...@noaa.gov: I'm interested in creating a graphic -like- this: c - ggplot(mtcars,

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

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 userid and

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,

[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

  1   2   >