[R] trouble installing SparseM

2012-04-25 Thread Erin Hodgess
Dear R People: I am attempting to install SparseM on R 2.15.0 on a Linux 11.10 system. Here is the output install.packages(SparseM,depen=TRUE) Installing package(s) into ‘/home/erin/R/x86_64-pc-linux-gnu-library/2.15’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this

[R] Using apply() with a function involving ode()

2012-04-25 Thread Adam Zeilinger
Hello, I am trying to get the output from the numerical simulation of a system of ordinary differential equations for a range of values for three parameters. I am using the ode() function (deSolve package) to run the numerical simulation and apply() to run the simulation function for each

[R] Combining local data frame with external data

2012-04-25 Thread omezquita
Hi, I have a list of IDs on a data frame and I want to extract information for those IDs from an external database. I did a workaround using the IN clause in SQL but when the number of IDs is big this method doesn't work. In other words, I want to create a join between a local and a external

Re: [R] Conditional average

2012-04-25 Thread Christopher W. Ryan
Kebrab67-- It's difficult to answer in the absence of a small bit of representative data, and more information about it. How is age76 recorded, as numerical years or in categories (age ranges?) And what are years (you didn't mention them as a variable in your data.) That being said,

[R] How to reduce plot size on linux?

2012-04-25 Thread Manish Gupta
Hi, I am working on linux and i need to reduce plot size (bar plot) so that i can easily use in sweave. How can i implement it? Regards -- View this message in context: http://r.789695.n4.nabble.com/How-to-reduce-plot-size-on-linux-tp4585371p4585371.html Sent from the R help mailing list

[R] Removing the rows from dataset

2012-04-25 Thread santoshdvn
Hi, I have data set where i have col1,col2,col3,col4 i want to write a condition where the rows has to removed from the dataset for col110 Please help, Thanks Santosh -- View this message in context: http://r.789695.n4.nabble.com/Removing-the-rows-from-dataset-tp4585710p4585710.html Sent

Re: [R] trouble installing SparseM

2012-04-25 Thread Uwe Ligges
On 25.04.2012 08:21, Erin Hodgess wrote: Dear R People: I am attempting to install SparseM on R 2.15.0 on a Linux 11.10 system. Here is the output install.packages(SparseM,depen=TRUE) Installing package(s) into ‘/home/erin/R/x86_64-pc-linux-gnu-library/2.15’ (as ‘lib’ is unspecified) ---

Re: [R] Removing the rows from dataset

2012-04-25 Thread Jeff Newmiller
Seems you should re-read An Introduction to R that comes with it. Hint: look for subset. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.

Re: [R] trouble installing SparseM

2012-04-25 Thread Prof Brian Ripley
On 25/04/2012 08:05, Uwe Ligges wrote: On 25.04.2012 08:21, Erin Hodgess wrote: Dear R People: I am attempting to install SparseM on R 2.15.0 on a Linux 11.10 system. Here is the output install.packages(SparseM,depen=TRUE) Installing package(s) into

[R] RCOM comInvoke

2012-04-25 Thread Arnaud Battistella
Hi, I have a quick question regarding RCOM and in particular the comInvoke function. When we use comCreateObject we have a way to check the object was properly created with comIsValidHandle; however, after calling comInvoke the only way to check it worked as expected is to use comGetProperty and

[R] [pROC] roc.test returns NA p-value...

2012-04-25 Thread O
Hello, I am comparing two ROC curves with bootstraping. However, some runs return p-value = NA, and I have no clue why. Is this anyhow related to like sample size or no sufficient numbers of bootstraping? I used the default value (i.e. boot.n=2000), and the number of observations are quite big

Re: [R] Using apply() with a function involving ode()

2012-04-25 Thread Berend Hasselman
See inline comments. On 25-04-2012, at 08:40, Adam Zeilinger wrote: Hello, I am trying to get the output from the numerical simulation of a system of ordinary differential equations for a range of values for three parameters. I am using the ode() function (deSolve package) to run the

Re: [R] How to reduce plot size on linux?

2012-04-25 Thread Uwe Ligges
On 25.04.2012 04:02, Manish Gupta wrote: Hi, I am working on linux and i need to reduce plot size (bar plot) so that i can easily use in sweave. How can i implement it? You can control the size of the plots from Sweave, no need to change soemthing in the plts themselves (unless you want

Re: [R] [pROC] roc.test returns NA p-value...

2012-04-25 Thread Uwe Ligges
Probably you got NAs in some bootstrap results, or you got a 0 variance, or you hat 0 observations in a group you compared to another group? Check the data and the separate results! Uwe Ligges On 25.04.2012 09:28, O wrote: Hello, I am comparing two ROC curves with bootstraping. However,

Re: [R] Splitting data into test and train (80:20) kepping attributes similar

2012-04-25 Thread Dwaipayan Dasgupta
Hi, Could someone help me with this please , im trying to use Y = Attrition_data[,1] # extract labels from the data msk = sample.split (Y, SplitRatio=3/4) table(Y,msk) to do the splitting but it keeps throwing up and error Error: could not find function sample.split Could you please help

Re: [R] How to reduce plot size on linux?

2012-04-25 Thread Rainer Schuermann
Cross posting http://stackoverflow.com/questions/10308955/how-to-reduce-image-size-in-sweave The code you have provided there is unusable, I assume your problems come from a lack of understanding how Sweave works (nothing to do with Linux). Always make sure that = and @ are always the first

[R] R shell script

2012-04-25 Thread aoife doherty
Hey guys, Does anyone have an example of a REALLY simple shell script in R. Basically i want to run this command: library(MASS) wilcox.test(list1,list2,paired=TRUE,alternative=c(greater),correct=TRUE,exact=FALSE) in a shell script something like this: #!/bin/bash R library(MASS) for i in *.out

Re: [R] Positioning main title

2012-04-25 Thread Jim Lemon
On 04/25/2012 12:28 AM, ramonovelar wrote: Hello, I have a barplot where each row has quite long texts and I have used par to make some room in the left: par(mar=c(0, 17, 3, 0), oma=c(0, 0, 0, 0)) barplot2(prueba, main = l, col=colores, horiz=TRUE,las=1, cex.names=.7) My problem is that main

Re: [R] Adding more files to list

2012-04-25 Thread Brian Flatley
Hi, I have searched over the last two days to try and sort this problem but unfortunately I cannot find the correct solution. I have a main directory - Spectra In this folder I have two subfolders Normal and Case I am using a package MALDIquant for processing of mass spectrometry data,

Re: [R] take data from a file to another according to their correlation coefficient

2012-04-25 Thread jeff6868
Seems to work great! I have a last question (or 2) for you about it, and I will leave you alone afterwords, I promise :) I tested your function process.all for the automatization. It seems to be OK. It's just when I'd like to save the filled data files. If I name process.all, for example: test

Re: [R] Assignment problems

2012-04-25 Thread phillip03
Thanks again! I would like to construct 14 new 'year' dummy variables. I have 14 years: 1992:2006 with 231 observations pr. year. The year dummies should assign a 1 if the observation is within the specific year and 0 otherwise. So for example: 1992dummyvariable=1 if year=0 and so on. P --

[R] recommended way to group function calls in Sweave

2012-04-25 Thread Liviu Andronic
Dear all When using Sweave, I'm always hitting the same bump: I want to group repetitive calls in a function, but I want both the results and the function calls in the printed output. Let me explain myself. Consider the following computation in an Sweave document: summary(iris[,1:2])

Re: [R] Positioning main title

2012-04-25 Thread Ramon Ovelar
Many many thanks for the tip and for authoring this function! The final code for the plot goes like this: par(mar=c(0, 17, 3, 0), oma=c(0, 0, 0, 0)) barplot2(prueba, col=colores, horiz=TRUE,las=1, cex.names=.7) mtext(l,side = 3, at = getFigCtr()[1], line = 0.8, cex=1.5) On Wed, Apr 25, 2012

[R] Create a new Vector based on two columns

2012-04-25 Thread Patrick Hausmann
Hello, I am trying to get a new vector 'x1' based on the not NA-values in column 'a' and 'b'. I found a way but I am sure this is not the best solution. So any ideas on how to optimize this would be great! m - factor(c(a1, a1, a2, b1, b2, b3, d1, d1), ordered = TRUE) df - data.frame( a=

Re: [R] trouble loading ggplot2 using R

2012-04-25 Thread Ramon Ovelar
I don't think I have touched at anything at all. I'm very newbie to R and to be honest I don't know what Ramdom.seed is. I will try to find out. I have seen other messages about restoring random.seed, but in order to check that the problem is really that I have used some Viewing data commands.

Re: [R] Create a new Vector based on two columns

2012-04-25 Thread Petr Savicky
On Wed, Apr 25, 2012 at 02:22:05PM +0200, Patrick Hausmann wrote: Hello, I am trying to get a new vector 'x1' based on the not NA-values in column 'a' and 'b'. I found a way but I am sure this is not the best solution. So any ideas on how to optimize this would be great! m -

[R] FW: Combined grouped and stacked bargraph

2012-04-25 Thread Nicola Van Wilgen
Dear R list, It appears that my request from yesterday got a bit garbled. I have tried to rephrase and retype it - please let me know if you can help me - I am having some trouble drawing a bar-graph with two groups, both of which are stacked. I would like to plot the conservation status

Re: [R] Use of optim to fit two curves at the same time ?

2012-04-25 Thread Arnaud Mosnier
Dear list, In order to find a solution to my problem, I created a third objective function including both calculations done in the previous cases. This function return a value (i.e. the value to be minimize by optim) equal to the sum of the two sum of squares, but it does not work (see the code

Re: [R] FW: Combined grouped and stacked bargraph

2012-04-25 Thread John Kane
Hi Nicola, You have provided the code and data as requested the data is in a very unfriendly format. If you would supply the data in an easily useable format so that the readers here can work with it it would help. Since it looks like you have a small data set the easiest thing is to use

[R] fill a dataframe with zeros where the rows are a smaller subset of a larger dataframe (species by site)

2012-04-25 Thread Stephen Sefick
row - c(a,b,c,d,e,f,g) #rows from larger data frame row.1 - c(a,b,c,g) #rows of smaller data frame because d, e, and f don't contain any of the species, but the zeros are important x - data.frame(sp1=rnorm(4), sp2=rnorm(4), sp3=rnorm(4), sp4=rnorm(4)) rownames(x) - row.1 #I would like to

[R] Where to find the p-value of a correlation test

2012-04-25 Thread Aaditya Nanduri
Hey everyone, I hope this finds you in good cheer. I just have a quick question: What is the function that outputs the p-value for correlation? cor(x,y) only provides the R value. I would like the p-value associated with it. Thank you all for your help! [[alternative HTML version

Re: [R] trouble loading ggplot2 using R

2012-04-25 Thread Hadley Wickham
On Wed, Apr 25, 2012 at 6:27 AM, Ramon Ovelar ramon.ove...@gmail.com wrote: I don't think I have touched at anything at all. I'm very newbie to R and to be honest I don't know what Ramdom.seed is. I will try to find out. I have seen other messages about restoring random.seed, but in order to

Re: [R] Where to find the p-value of a correlation test

2012-04-25 Thread Ista Zahn
Hi, Look at the See also section of ?cor Best, Ista On Wed, Apr 25, 2012 at 9:30 AM, Aaditya Nanduri aaditya.nand...@gmail.com wrote: Hey everyone, I hope this finds you in good cheer. I just have a quick question: What is the function that outputs the p-value for correlation? cor(x,y)

Re: [R] recommended way to group function calls in Sweave

2012-04-25 Thread Duncan Murdoch
On 12-04-25 7:41 AM, Liviu Andronic wrote: Dear all When using Sweave, I'm always hitting the same bump: I want to group repetitive calls in a function, but I want both the results and the function calls in the printed output. Let me explain myself. Consider the following computation in an

Re: [R] trouble loading ggplot2 using R

2012-04-25 Thread David Winsemius
On Apr 25, 2012, at 8:27 AM, Ramon Ovelar wrote: I don't think I have touched at anything at all. I'm very newbie to R and to be honest I don't know what Ramdom.seed is. I will try to find out. I have seen other messages about restoring random.seed, but in order to check that the

Re: [R] Where to find the p-value of a correlation test

2012-04-25 Thread Duncan Murdoch
On 12-04-25 9:30 AM, Aaditya Nanduri wrote: Hey everyone, I hope this finds you in good cheer. I just have a quick question: What is the function that outputs the p-value for correlation? cor(x,y) only provides the R value. I would like the p-value associated with it. cor(x,y) calculates

Re: [R] Splitting data into test and train (80:20) kepping attributes similar

2012-04-25 Thread Jessica Streicher
Well, it throws an error, because there is no such function in default R. A bit of googling showed it might be the one in the caTools package. execute this: install.packages(caTools) library(caTools) before executing your code Am 25.04.2012 um 12:39 schrieb Dwaipayan Dasgupta: Hi, Could

Re: [R] How do i read the source code of biplot?

2012-04-25 Thread Kevin Wright
I think this should help: require(pcaMethods) data(metaboliteDataComplete) mdc - scale(metaboliteDataComplete, center=TRUE, scale=FALSE) ## Now create 5% of outliers. cond - runif(length(mdc))0.05; mdcOut - mdc mdcOut[cond] - 10 ## Now we do a conventional PCA and

Re: [R] recommended way to group function calls in Sweave

2012-04-25 Thread Liviu Andronic
On Wed, Apr 25, 2012 at 3:41 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: I would use the last method, or if the calls were truly repetitive (i.e. always identical, not just the same pattern), use a named chunk. Labeled chunks are indeed what I was looking for [1]. As far as I understand,

[R] random effects in library mgcv

2012-04-25 Thread Mabille, Geraldine
Hi, I am working with gam models in the mgcv library. My response variable (Y) is binary (0/1), and my dataset contains repeated measures over 110 individuals (same number of 0/1 within a given individual: e.g. 345-zero and 345-one for individual A, 226-zero and 226-one for individual B, etc.).

[R] Create new Vector based on two colums

2012-04-25 Thread Patrick Hausmann
Hello, I am trying to get a new vector 'x1' based on the not NA-values in column 'a' and 'b'. I found a way but I am sure this is not the best solution. So any ideas on how to optimize this would be great! m - factor(c(a1, a1, a2, b1, b2, b3, d1, d1), ordered = TRUE) df - data.frame( a=

Re: [R] Adding more files to list

2012-04-25 Thread Sebastian Gibb
Hi Brian, On Wednesday 25 April 2012 13:15:03 Brian Flatley wrote: I have a main directory - Spectra In this folder I have two subfolders Normal and Case The following should be enough: library(readBrukerFlexData) Spectra - mqReadBrukerFlex(Spectra/); ... The following command will open

[R] Help on time series Hurst exponent

2012-04-25 Thread Barun Saha
Hello, I'm an absolute beginner with R. I'm hoping to do some time-series analysis on my data. The data looks like #time value 18 153 20 426 70 7 83 130 84 7 and so on where time could be in seconds or hours or days (not all at the same time). How could I import such a file to R and do some

Re: [R] Conditional average

2012-04-25 Thread kebrab67
id age76 Wage76 Grade76 Black immigrt. ... 1 25 102456 12 1 0 2 27 15432 15 0 1 3 30 12340 16 1 1 Then I have lots of data variables 100 for 5000

Re: [R] fill a dataframe with zeros where the rows are a smaller subset of a larger dataframe (species by site)

2012-04-25 Thread chuck.01
-- View this message in context: http://r.789695.n4.nabble.com/fill-a-dataframe-with-zeros-where-the-rows-are-a-smaller-subset-of-a-larger-dataframe-species-by-sit-tp4586534p4586711.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] take data from a file to another according to their correlation coefficient

2012-04-25 Thread Rui Barradas
Hello, The first is easy. How can I cut these files and save them automatically (one file for ST001, another for ST002, ...) according to these columns names? Similar to the way they were read, using lapply on the results list. But first make a file names vector. (I've used the file

Re: [R] Adding more files to list

2012-04-25 Thread Jeff Newmiller
As to combining, use c(). as to tracking, keep track of the directory that goes with the file. There are various ways to do this: a) keep a vector of filenames, and every time you combine vectors of filenames, do the same for the vectors of directory names. You will probably need to use rep()

Re: [R] trouble loading ggplot2 using R

2012-04-25 Thread R. Michael Weylandt
Alternatively, the OP might just use set.seed(1) to get a fresh seed rather than playing with .Random.seed directly. To the OP: if you're on Mac, follow these instructions and we'll see if that fixes your problem: **) open Terminal **) type R -q --vanilla **) At the prompt type the following

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-25 Thread Paul Miller
Hello Dr. Winsemius, There was a non-numeric column. Thanks for helping me to see the obvious. Paul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] fill a dataframe with zeros where the rows are a smaller subset of a larger dataframe (species by site)

2012-04-25 Thread Stephen Sefick
I am subsetting a larger data frame that contains macroinverterate taxa. I am subsetting them at different levels of taxonomic resolution. Some of the sites do not have say Tipulidae present, so the rows are removed completely for this site. I would like to fill in the sites that were

Re: [R] Help on time series Hurst exponent

2012-04-25 Thread R. Michael Weylandt
You really don't want to use ts() -- if you want to use the tools in fArma use a timeSeries (provided by the package of the same name) Michael On Wed, Apr 25, 2012 at 9:54 AM, Barun Saha barun.sah...@gmail.com wrote: Hello, I'm an absolute beginner with R. I'm hoping to do some time-series

Re: [R] fill a dataframe with zeros where the rows are a smaller subset of a larger dataframe (species by site)

2012-04-25 Thread Sarah Goslee
The clarification helps; the original description was rather terse. What about: row - c(a,b,c,d,e,f,g) #rows from larger data frame x - data.frame(sp1=rnorm(4), sp2=rnorm(4), sp3=rnorm(4), sp4=rnorm(4)) rownames(x) - row.1 merge(x, matrix(row, ncol=1), by.x=0, by.y=1, all=TRUE)

[R] RODBC Error Code 202 on Mac OS X 10.6

2012-04-25 Thread julia . jacobson
Hello everybody out there using the RODBC package, On my linux (unixODBC) and windows machines, I can successfully use the RODBC package to connect to a PostgreSQL databse. On my Mac Book running Mac OS X 10.6 (Intel 64bit architecture), I get the error code 202 and message ? when I try to

Re: [R] R shell script

2012-04-25 Thread R. Michael Weylandt
You can do this in bash but why not just do it in R directly? You probably need list.files(pattern = .out) to get started. Then just wrap your script in a function and pass it to (s|l)apply something like: sapply(list.files(pattern = *.out), function(x) wilcox.test ( ... ) ) Michael On Wed,

[R] help with significance of the estimates when running the pgls function

2012-04-25 Thread Bianca A Santini
Hello, I am running the pgls () function of the caper programme, the output has some estimates, some of them are negative and others are positive ( values can be less, equal, or more than 1 ). If I have an estimate of -0.12 for a coefficient (body size) on head size. How do I interpreted it?

Re: [R] R shell script

2012-04-25 Thread aoife doherty
Thanks for replying. My problem is that i have say 50 input files, that i wanted to run a particular command on, get 50 output files, and then when i close R, have them in my directory? so for example if i say: R library(MASS) list.files(pattern = .out) sapply(list.files(pattern = *.out),

Re: [R] R shell script

2012-04-25 Thread Steve Lianoglou
Check out the vignette for the optparse library: http://cran.r-project.org/web/packages/optparse/vignettes/optparse.pdf Super helpful library if you plan on making any semi-interesting command line scripts w/ R. -steve On Wed, Apr 25, 2012 at 6:47 AM, aoife doherty aoife.m.dohe...@gmail.com

Re: [R] recommended way to group function calls in Sweave

2012-04-25 Thread Duncan Murdoch
On 25/04/2012 10:20 AM, Liviu Andronic wrote: On Wed, Apr 25, 2012 at 3:41 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: I would use the last method, or if the calls were truly repetitive (i.e. always identical, not just the same pattern), use a named chunk. Labeled chunks are indeed

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-25 Thread peter dalgaard
On Apr 24, 2012, at 19:15 , Rui Barradas wrote: Has anyone realized that both 'non' and 'un' end with the same letter? The only one we really need to check? (tmp - c('mutation','nonmutated','unmutated','verymutated','other')) i1 - grepl(muta, tmp) i2 - grepl(nmuta, tmp) tmp[i1

Re: [R] Splitting data into test and train (80:20) kepping attributes similar

2012-04-25 Thread Dwaipayan Dasgupta
Thank you so much for replying. I tried what you said but it still throws the same error i.e could not find function sample.split Might be because of the version of R I am running (R version 2.12.2).i do not have admin rights to upgrade to the newest version. Is there anything else I can try? Im

Re: [R] Create new Vector based on two colums

2012-04-25 Thread ilai
On Wed, Apr 25, 2012 at 6:14 AM, Patrick Hausmann patrick.hausm...@covimo.de wrote: Hello, I am trying to get a new vector 'x1' based on the not NA-values in column 'a' and 'b'. I found a way but I am sure this is not the best solution. So any ideas on how to optimize this would be great! If

Re: [R] Help on time series Hurst exponent

2012-04-25 Thread R. Michael Weylandt michael.weyla...@gmail.com
www.rmetrics.org/ebooks There's a free book on time series classes in R here: I haven't used it myself, but it is by the fArma (RMetrics) folks so I presume it covers their own time series class. Michael On Apr 25, 2012, at 11:11 AM, Barun Saha barun.sah...@gmail.com wrote: Thanks,

Re: [R] recommended way to group function calls in Sweave

2012-04-25 Thread Rainer Schuermann
What I usually do when I have to write a report with some functions I use multiple times is that I put them in a separate file (call it setup.Rnw or so). The first chunk there loads the libraries, sets initial variable values etc: echo=FALSE, results=hide= library( xtable ) d - iris ind - 1 @

Re: [R] Splitting data into test and train (80:20) kepping attributes similar

2012-04-25 Thread Jessica Streicher
Don't know whats wrong there (except if you're using the eclipse R plugin on a mac like me and the window for choosing the download site doesn't pop up.. did it?^^) Anyway, you could just split all of your data into 2 datasets, one that has all the data labeled 0, the other for all labeled 1,

[R] pca biplot.princomp has a bug?

2012-04-25 Thread Michael
x=rmvnorm(2000, rep(0, 6), diag(c(5, rep(1,5 x=scale(x, center=T, scale=F) pc - princomp(x) biplot(pc) There are a bunch of red arrows plotted, what do they mean? I knew that the first arrow labelled with Var1 should be pointing the most varying direction of the data-set (if

Re: [R] RODBC Error Code 202 on Mac OS X 10.6

2012-04-25 Thread Marc Schwartz
On Apr 25, 2012, at 10:03 AM, julia.jacob...@arcor.de wrote: Hello everybody out there using the RODBC package, On my linux (unixODBC) and windows machines, I can successfully use the RODBC package to connect to a PostgreSQL databse. On my Mac Book running Mac OS X 10.6 (Intel 64bit

Re: [R] R shell script

2012-04-25 Thread mlell08
On 25.04.2012 17:12, Steve Lianoglou wrote: Check out the vignette for the optparse library: http://cran.r-project.org/web/packages/optparse/vignettes/optparse.pdf Super helpful library if you plan on making any semi-interesting command line scripts w/ R. -steve On Wed, Apr 25, 2012 at

[R] Average for Huge file

2012-04-25 Thread Hassan
Hi, I am a PhD student. Basic knowing R. I have 2 datw files 1st 5min intervals the 2nd 1min for a month. My taske is to have 15min average for all. This how data look; Date Pm FF LL KK HH NNWwDD 01/01/2012 00:00:00

[R] transforming data based on factors in a dataframe

2012-04-25 Thread Carly Huitema
Hello R-help list, I would really appreciate help with my factoring problem. My generated data is this: df - expand.grid(T=seq(10,80, by=5), conc=rep(c(1, 3, 7), 2)) df$curve - as.factor(rep(1:6, each=length(seq(10,80, by=5 df$counts - 3*df$T/df$conc + rnorm(df$T,0,2) plot(counts~T, df)

[R] Help confidence interval graphics

2012-04-25 Thread rafitoariaz
Hi everybody. I'm making a confidence interval plot using the function plotCI. I would like to decrease the space between the lines. How can I do that? Thanks alot -- View this message in context: http://r.789695.n4.nabble.com/Help-confidence-interval-graphics-tp4587052p4587052.html Sent from

Re: [R] Help on time series Hurst exponent

2012-04-25 Thread Barun Saha
Thanks, Michael! Could you plz point to some easy tutorials regarding this? On Wed, Apr 25, 2012 at 8:14 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: You really don't want to use ts() -- if you want to use the tools in fArma use a timeSeries (provided by the package of the same

[R] r-square for non-linear regression

2012-04-25 Thread Pierre Grison
Hi, I saw you discussed about the meaning of the R squared in a nls regression. Do you have a source or a quotation please? kind regards, Pierre Grison Tel: 06 01 79 74 22 Mail: pgri...@hotmail.fr [[alternative HTML version deleted]] __

Re: [R] R shell script

2012-04-25 Thread Steve Lianoglou
Hi, On Wed, Apr 25, 2012 at 11:11 AM, aoife doherty aoife.m.dohe...@gmail.com wrote: Thanks for replying. My problem is that i have say 50 input files, that i wanted to run a particular command on, get 50 output files, and then when i close R, have them in my directory? so for example if i

Re: [R] How to insert filename as column in a file

2012-04-25 Thread Shivam
Thanks Jeff. I had tried the 'list' approach as well but got stuck with the below error: Error in `$-.data.frame`(`*tmp*`, date, value = 20100701) : replacement has 1 rows, data has 0 Couldnt find a work around to this, hence resorted to the multiple dataframes approach. Any insights into

Re: [R] r-square for non-linear regression

2012-04-25 Thread Bert Gunter
This question has been asked many times before. Please search the archives. The short answer is: R-squared is more or less meaningless in nonlinear regression. The archives provide elaboration and caveats to this claim. -- Bert On Wed, Apr 25, 2012 at 8:12 AM, Pierre Grison pgri...@hotmail.fr

Re: [R] transforming data based on factors in a dataframe

2012-04-25 Thread jim holtman
try this: (uses 'ave') df - expand.grid(T=seq(10,80, by=5), conc=rep(c(1, 3, 7), 2)) df$curve - as.factor(rep(1:6, each=length(seq(10,80, by=5 df$counts - 3*df$T/df$conc + rnorm(df$T,0,2) plot(counts~T, df) df$zero - ave(df$counts, df$curve, FUN = function(x) x - min(x)) df T

Re: [R] transforming data based on factors in a dataframe

2012-04-25 Thread David Winsemius
On Apr 25, 2012, at 10:57 AM, Carly Huitema wrote: Hello R-help list, I would really appreciate help with my factoring problem. My generated data is this: df - expand.grid(T=seq(10,80, by=5), conc=rep(c(1, 3, 7), 2)) df$curve - as.factor(rep(1:6, each=length(seq(10,80, by=5 df$counts

Re: [R] fill a dataframe with zeros where the rows are a smaller subset of a larger dataframe (species by site)

2012-04-25 Thread Stephen Sefick
Thank you all very much, that did the trick. Stephen On Wed 25 Apr 2012 09:59:38 AM CDT, Sarah Goslee wrote: The clarification helps; the original description was rather terse. What about: row- c(a,b,c,d,e,f,g) #rows from larger data frame x- data.frame(sp1=rnorm(4), sp2=rnorm(4),

[R] On the Design of the R Language

2012-04-25 Thread R. Michael Weylandt michael.weyla...@gmail.com
http://www.cs.purdue.edu/homes/jv/pubs/ecoop12.pdf A new paper out on R the language -- I'm not all the way through it but it's been an interesting read so far. Thought it might be of interest to the list. Michael Weylandt [[alternative HTML version deleted]]

Re: [R] Using apply() with a function involving ode()

2012-04-25 Thread Adam Zeilinger
Dear Berend, Yes, the wnv.sim function should have included wnv.model instead of wnv.incubation. Sorry for the typo. Although I had inspected the expand.grid() object, I had not connected the error with a naming problem. Thanks so much for the help! The function works perfectly.

Re: [R] pca biplot.princomp has a bug?

2012-04-25 Thread Kevin Wright
The arrows are not pointing in the most-varying direction of the data. The principal components are pointing in the most-varying direction of the data. But you are not plotting the data on the original scale, you are plotting the data on the rotated scale, and thus the horizontal axis is the

Re: [R] On the Design of the R Language

2012-04-25 Thread Thomas Adams
Hmmm… an 'objective' assessment? Maybe. But it looks to me that some commercial enterprise paid for this study as a means to argue against the use of R in favor of a commercial package… On Wed, Apr 25, 2012 at 1:48 PM, R. Michael Weylandt michael.weyla...@gmail.com michael.weyla...@gmail.com

[R] locate values to their positions based on their pixel and line in other files

2012-04-25 Thread Amen
I have 3 files A ,B ,C as binary files. C represents the values of tepm measured every 3 hours for one month so it has 674200 columns and 248 rows.values of A represent the correspond lines(these values could be within 1to360) and , while values of B represent the correspond pixel(1to720) for each

Re: [R] On the Design of the R Language

2012-04-25 Thread Marc Schwartz
I have not read it yet, but the acknowledgements at the end of the paper note that: 1. It was supported by an NSF grant. 2. At least two members of R Core are recognized amongst the list of names. Regards, Marc Schwartz On Apr 25, 2012, at 1:07 PM, Thomas Adams wrote: Hmmm∑ an 'objective'

[R] Equate two (or more) functions

2012-04-25 Thread pannigh
Dear List, I was wondering if there is a simple way to solve (equate) two functions in R. For example: (1) 5x + 3y = 30 (2) 12x - 2y = 26 I would like R to finde x = 3 and y = 5 Is there an implemented function in R or would I have to write an own function? Thank you very much for your help.

Re: [R] Average for Huge file

2012-04-25 Thread rafitoariaz
Hi. I would use the function aggregate, but first you will have to tag each row with a special code so R can recognize the group of data and apply the function you desire. For example, with your data I would do this: Date Pm FF LL KK

[R] Intercept between two lines

2012-04-25 Thread pannigh
Dear List, I know this is not the first post on this topic, but I need basic help I guess. Assuming the simple case of two lines with one intercept, how can I make R calculate this intercept, NOT using locator(). par (xaxs=i, yaxs=i) plot( 1, bty=n ,xlim=c(0,300) , ylim=c(0,300) , xlab=X, ylab=Y)

Re: [R] Equate two (or more) functions

2012-04-25 Thread Rui Barradas
Hello, Try (x - matrix(c(5, 12, 3, -2), ncol=2)) (y - c(30, 26)) solve(x, y) solve.qr(qr(x), y) (Use the second.) Also, see section 5.7.5 of the R-intro.pdf that comes with your (any) installation of R. Hope this helps, Rui Barradas -- View this message in context:

Re: [R] Intercept between two lines

2012-04-25 Thread Jorge I Velez
Hi pannigh, The following might get you started: x0 - uniroot(function(x) 100-0.5*x - (150- x), c(0, 150))$root x0 [1] 100 100- 0.5*x0 [1] 50 HTH, Jorge.- On Wed, Apr 25, 2012 at 1:01 PM, pannigh wrote: Dear List, I know this is not the first post on this topic, but I need basic help I

Re: [R] On the Design of the R Language

2012-04-25 Thread peter dalgaard
On Apr 25, 2012, at 20:19 , Marc Schwartz wrote: I have not read it yet, but the acknowledgements at the end of the paper note that: 1. It was supported by an NSF grant. 2. At least two members of R Core are recognized amongst the list of names. Also, most of the overall content is

Re: [R] Equate two (or more) functions

2012-04-25 Thread Berend Hasselman
On 25-04-2012, at 18:52, pannigh wrote: Dear List, I was wondering if there is a simple way to solve (equate) two functions in R. For example: (1) 5x + 3y = 30 (2) 12x - 2y = 26 I would like R to finde x = 3 and y = 5 Is there an implemented function in R or would I have to write an

Re: [R] On the Design of the R Language

2012-04-25 Thread Bert Gunter
Thanks Michael: Interesting! Is it legitimate to comment on this in this list? It would only be my opinions, not real R-Help stuff. Where would be a better place to post such UN-expert opinion? -- Bert On Wed, Apr 25, 2012 at 10:48 AM, R. Michael Weylandt michael.weyla...@gmail.com

Re: [R] Rprofile.site on Windows

2012-04-25 Thread Duncan Murdoch
On 12-04-25 4:04 PM, Trevor Miles wrote: Thanks Duncan. The only .site files I have are Reviron.site and Rprofile.site, which are both in C:\Program Files\R\R-2.14.1\etc. My advice was about 2.15.0, but I don't remember any of this changing recently. Copying these files to C:\Program

Re: [R] Help confidence interval graphics

2012-04-25 Thread Michael Bibo
rafitoariaz rafitoariaz at hotmail.com writes: Hi everybody. I'm making a confidence interval plot using the function plotCI. I would like to decrease the space between the lines. How can I do that? Thanks alot There may be a better answer than this, but here goes: The lines are plotted

Re: [R] Re : Design of experiments for Choice-Based Conjoint Analysis (CBC)

2012-04-25 Thread jhelvy
Hi, I came across this paper which is essentially a tutorial on how to generate designs in R using the AlgDesign package. Hope it's helpful. I'm not trying to generate designs in R using priors, but haven't found a way to do it yet. Anyone out there have any ideas? Cheers, John Paul -- View

Re: [R] On the Design of the R Language

2012-04-25 Thread Steve Lianoglou
Hi, On Wed, Apr 25, 2012 at 4:06 PM, Bert Gunter gunter.ber...@gene.com wrote: Thanks Michael: Interesting! Is it legitimate to comment on this in this list? It would only be my opinions, not real R-Help stuff. FWIW, I'd be interested in hearing opinions about it from R-folk ... Where

Re: [R] Scatter plot / LOESS, or LOWESS for more than one parameter

2012-04-25 Thread Greg Snow
You can also use range( MC.pH, MV.pH, na.rm=TRUE). On Tue, Apr 24, 2012 at 1:29 PM, David Doyle kydaviddo...@gmail.com wrote: Hi Greg, Sloved my own problem. I had some missing data NA in the datasets.  So I manually entered the ylim=range(4,6) and it worked!!! Thanks!! David On Tue,

Re: [R] How to test if a slope is different than 1?

2012-04-25 Thread Greg Snow
Doesn't the p-value from using offset work for you? if you really need a p-value. The confint method is a quick and easy way to see if it is significantly different from 1 (see Rolf's response), but does not provide an exact p-value. I guess you could do confidence intervals at different

Re: [R] Accessing a list

2012-04-25 Thread Greg Snow
I believe that fortune(312) applies here. As my current version of fortunes does not show this I am guessing that it is in the development version and so here is what fortune(312) will eventually print (unless something changes or I got something wrong): The problem here is that the $ notation

[R] comparison of bivariate normal distributions

2012-04-25 Thread Fabian Roger
sorry for cross-posting Dear all, I have tow (several) bivariate distributions with a known mean and variance-covariance structure (hence a known density function) that I would like to compare in order to get an intersect that tells me something about how different these distributions are (as

  1   2   >