Re: [R] Generating uniformly distributed correlated data.

2011-02-20 Thread Spencer Graves
You may also be interested in the psych package or possibly mvtBinaryEP. I found these using sos: library(sos) tc - findFn('tetrachoric correlation') # 26 matches tcs - findFn('tetrachoric correlations')#27 matches tc. - tc|tcs summary(tc.) # 35 links in 5 pkgs tc. All but 3 of

Re: [R] Generating uniformly distributed correlated data.

2011-02-20 Thread Enrico Schumann
maybe this helps http://comisef.wikidot.com/tutorial:correlateduniformvariates regards enrico -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Søren Faurby Gesendet: Sonntag, 20. Februar 2011 03:18 An:

Re: [R] Scaling Lattice Graphics for tikzDevice

2011-02-20 Thread Deepayan Sarkar
On Sun, Feb 20, 2011 at 5:23 AM, Elliot Joel Bernstein elliot.bernst...@fdopartners.com wrote: On Feb 18, 2011 11:02 PM, Deepayan Sarkar deepayan.sar...@gmail.com wrote: On Fri, Feb 18, 2011 at 11:04 PM, Elliot Joel Bernstein elliot.bernst...@fdopartners.com wrote: I'm trying to use

Re: [R] Generating uniformly distributed correlated data.

2011-02-20 Thread Sarah Goslee
On Sun, Feb 20, 2011 at 12:18 AM, Peter Langfelder peter.langfel...@gmail.com wrote: On Sat, Feb 19, 2011 at 6:17 PM, Søren Faurby soren.fau...@biology.au.dk wrote: I wish to generate a vector of uniformly distributed data with a defined correlation to another vector The only function I

[R] pre-announcement Google Summer of Code 2011 -- R projects

2011-02-20 Thread Prof. John C Nash
In a little over a month (Mar 28), students will have just over a week (until April 8) to apply to work on Google Summer of Code projects. In the past few years, R has had several such projects funded. Developers and mentors are currently preparing project outlines on the R wiki at

Re: [R] covar

2011-02-20 Thread Juliet Hannah
Relatedness if often defined in terms of the kinship matrix. It may be helpful to search for this. Several packages in R use this matrix including the kinship package. On Wed, Feb 16, 2011 at 3:14 PM, Val valkr...@gmail.com wrote: Hi all, I want to construct relatedness among individuals and

Re: [R] Seeking help in Package development

2011-02-20 Thread Uwe Ligges
May I add that the best documentation for building packages is the Writing R Extensions that ships with the current R version. It is always current, precise, and not as outdated as many resources you find somewhere in the web - yes, the one cited below is outdated. Uwe Ligges On 19.02.2011

[R] inter-specific competition - community matrices and two species models using Lotka-Volterra

2011-02-20 Thread Chris Buddenhagen
Does anyone know of example r-code/packages for carrying out analysis? Preferably this would have examples from real experimental data of two or more competing species... Thanks Chris Buddenhagen [[alternative HTML version deleted]] __

Re: [R] inter-specific competition - community matrices and two species models using Lotka-Volterra

2011-02-20 Thread Bob O'Hara
On 20 February 2011 16:19, Chris Buddenhagen cbuddenha...@gmail.com wrote: Does anyone know of example r-code/packages for carrying out analysis? Preferably this would have examples from real experimental data of two or more competing species... In discrete time, you can use a Gompertz

Re: [R] Confidence Intervals on Standard Curve

2011-02-20 Thread nzcoops
model - lm(Approximate.Counts~X..Light.Transmission + I(Approximate.Counts^2), data=Standards) Might not be addressing the problem, don't you have Y ~ X + Y^2 here? That's a violation of the assumptions of an lm isn't it? Also for plotting CI on a curve look into ggplot2::geom_ribbon, it's

[R] Conditional sum

2011-02-20 Thread mathijsdevaan
Hi, I have a DF like this: DF = data.frame(read.table(textConnection(A B C 1 b1 1999 0.25 2 c1 1999 0.25 3 d1 1999 0.25 4 a2 1999 0.25 5 c2 1999 0.25 6 d2 1999 0.25 7 a3 1999 0.25 8 b3 1999 0.25 9 d3 1999 0.25 10 a4 1999 0.25 11 b4 1999 0.25 12 c4 1999 0.25 13 b1

[R] Plot of set

2011-02-20 Thread . .
I am in the situation where I have to make a two-dimential plot of a set. If I simplify my data it would be something along the lines of wanting to plot {x,y| x^2+y^2 = 1}. I am aware of the contour and persp plot, but cannot figure out how to convert one of those to draw the set. I have

[R] Help Metafor

2011-02-20 Thread petretta
Dear Sir, I'm using the Metafor package; however, introducing moderators, I'm unable to obtain both I^2 (% of total variability due to heterogeneity) and H^2 (total variability / within-study variance). It is possible to obtain I^2 and H^2 also with moderators? As example

[R] concatenate vector after strsplit()

2011-02-20 Thread Robert Baer
ls is a list of character vectors created by strsplit() I want to concatenate the 1st 4 character elements of each list item as a new vector called file. I admit to being confused about list syntax even after numerous readings. Here's what I tried: ls - list(c(Focused, 10k, A12, t04.tif, +,

Re: [R] concatenate vector after strsplit()

2011-02-20 Thread Jorge Ivan Velez
Hi Robert, You might try do.call(rbind, lapply(yourlist, [, 1:4)) and then write the resulting file using write.table(...). Best, Jorge On Sun, Feb 20, 2011 at 11:13 AM, Robert Baer wrote: ls is a list of character vectors created by strsplit() I want to concatenate the 1st 4 character

[R] prevent export of specific functions in NAMESPACE

2011-02-20 Thread Rajarshi Guha
Hi, I'd like to prevent the export a specific function in the NAMESPACE file. The example in the R documentation uses a regex to prevent export of a set of functions, but as far as I can see there is no easy way to specify that a function of a specific name should not be exported. This thread

Re: [R] Conditional sum

2011-02-20 Thread Dieter Menne
mathijsdevaan wrote: I have a DF like this: DF = data.frame(read.table(textConnection(A B C 1 b1 1999 0.25 2 c1 1999 0.25 .. For each factor in A I want to sum the values of C for all years(Bn) prior to the current year(Bi): 1 b1 1999 0.25 0 2 c1 1999 0.25 0.4 3

Re: [R] Plot of set

2011-02-20 Thread David Winsemius
On Feb 20, 2011, at 4:41 AM, . . wrote: I am in the situation where I have to make a two-dimential plot of a set. If I simplify my data it would be something along the lines of wanting to plot {x,y| x^2+y^2 = 1}. I am aware of the contour and persp plot, but cannot figure out how to

Re: [R] concatenate vector after strsplit()

2011-02-20 Thread Robert Baer
You might try do.call(rbind, lapply(yourlist, [, 1:4)) Thanks, Jorge, but when I tried this I simply got a matrix of character strings rather than my original list of character strings as in: m = do.call(rbind, lapply(ls, [, 1:4)) m [,1] [,2] [,3] [,4] [1,] Focused 10k A12 t04.tif

Re: [R] concatenate vector after strsplit()

2011-02-20 Thread David Winsemius
On Feb 20, 2011, at 11:13 AM, Robert Baer wrote: ls is a list of character vectors created by strsplit() I want to concatenate the 1st 4 character elements of each list item as a new vector called file. I admit to being confused about list syntax even after numerous readings. Here's

Re: [R] concatenate vector after strsplit()

2011-02-20 Thread David Winsemius
On Feb 20, 2011, at 12:49 PM, David Winsemius wrote: On Feb 20, 2011, at 11:13 AM, Robert Baer wrote: ls is a list of character vectors created by strsplit() I want to concatenate the 1st 4 character elements of each list item as a new vector called file. I admit to being confused

Re: [R] tikzDevice compiling problem

2011-02-20 Thread cuass
Thank you! -- View this message in context: http://r.789695.n4.nabble.com/tikzDevice-compiling-problem-tp3309028p3315247.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Conditional sum

2011-02-20 Thread mathijsdevaan
Thanks for the quick response, but it doesn't do the trick. There are two problems: 1. The ith value of the newly created variable DF$D also includes the ith value of DF$C (this problem is easily solved by DF$D = DF$D-DF$C.) 2. If group i in DF$group appears more than once in year t, the value of

Re: [R] concatenate vector after strsplit()

2011-02-20 Thread Gabor Grothendieck
On Sun, Feb 20, 2011 at 12:43 PM, Robert Baer rb...@atsu.edu wrote: You might try do.call(rbind, lapply(yourlist, [, 1:4)) Thanks, Jorge, but when I tried this I simply got a matrix of character strings rather than my original list of character strings as in: m = do.call(rbind, lapply(ls,

Re: [R] concatenate vector after strsplit()

2011-02-20 Thread Robert Baer
Thanks Jorge and David. Both worked. Looks like I have to read more on [ as an extractor function for lists. do.call() is also on my list of low level magic' I don't understand. G Appreciate the help! fil1 = do.call(c, lapply(lapply(ls1, [, 1:4), paste, sep = , collapse = -)) fil2 =

Re: [R] Confidence Intervals on Standard Curve

2011-02-20 Thread Ben Ward
It is, I tried a glm with a poisson distribution, as was suggested to me previously, but the Residual Deviance was too high - the book I'm reading says it suggests overdispersion because it's way above the Residual degrees of freedom: glm(formula = Approximate.Counts ~ X..Light.Transmission,

Re: [R] concatenate vector after strsplit()

2011-02-20 Thread Robert Baer
Thanks Gabor. Your suggestions work as well and have been helpful in my understanding, I can't use any excuse of not knowing about ] in this case! Rob fil3 = sapply(ls1, function(x) paste(x[1:4], collapse = )) fil4 = sapply(unname(as.data.frame(ls1))[1:4,], paste, collapse = ) fil5 =

Re: [R] Confidence Intervals on Standard Curve

2011-02-20 Thread David Winsemius
On Feb 20, 2011, at 1:27 PM, Ben Ward wrote: However, the Y ~ X + Y^2 Produces the best fitting line - it is pretty much on the data points - I'm trying to make a standard curve, with which to take readings from a spectrophotometer off of. Rather than what I would normally use models

Re: [R] Bootstraps standard error

2011-02-20 Thread danielepippo
when I calculate the bootstrap standard errors the results are summarized in a matrix with columns equal to the parameters of the model. In my case I have a matrix like this: [,1] [,2] [,3] [,4] [,5] [,6][,7] [,8][,9]

Re: [R] Variable length datafile import problem

2011-02-20 Thread John Kane
Hi Ingo, Sorry for being so slow to get back to you. I've had a bit of a problem with my internet connection. Just how large is the data set? You might want to have a look at this thread re size of R data files. http://r.789695.n4.nabble.com/Boundaries-of-R-td3312593.html . In any case,

Re: [R] Random Forest Cross Validation

2011-02-20 Thread Max Kuhn
I am using randomForest package to do some prediction job on GWAS data. I firstly split the data into training and testing set (70% vs 30%), then using training set to grow the trees (ntree=10). It looks that the OOB error in training set is good (10%). However, it is not very good for the

Re: [R] Bootstraps standard error

2011-02-20 Thread David Winsemius
On Feb 20, 2011, at 2:20 PM, danielepippo wrote: when I calculate the bootstrap standard errors ... of what? the results are summarized in a matrix with columns equal to the parameters of the model. ... but they are all the same within each row??? In my case I have a matrix like this:

Re: [R] Bootstraps standard error

2011-02-20 Thread danielepippo
Can anyone help me please? -- View this message in context: http://r.789695.n4.nabble.com/Bootstraps-standard-error-tp3313322p3315463.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Plotting individual trajectories from individual growth model

2011-02-20 Thread dadrivr
Hi all, I am trying to plot the fitted trajectories for each individual from an individual growth model (fit with a linear mixed effects model in lme). How can I plot each person's trajectory in the *same* panel, along with the mean-level trajectory? Below is an image of a plot similar to what

Re: [R] joint estimation of two poisson equations

2011-02-20 Thread danielepippo
Hi, I have the same problem to find out the standard errors of the parameter in the same package you have used. I couldn't find out how to get standard errors and p-values from the package, so I bootstrapped them. Can you explain your method to find out the standard errors with the bootstrap

Re: [R] prevent export of specific functions in NAMESPACE

2011-02-20 Thread Duncan Murdoch
On 11-02-20 11:58 AM, Rajarshi Guha wrote: Hi, I'd like to prevent the export a specific function in the NAMESPACE file. The example in the R documentation uses a regex to prevent export of a set of functions, but as far as I can see there is no easy way to specify that a function of a specific

Re: [R] inter-specific competition - community matrices and two species models using Lotka-Volterra

2011-02-20 Thread Ben Bolker
Bob O'Hara rni.boh at gmail.com writes: On 20 February 2011 16:19, Chris Buddenhagen wrote: Does anyone know of example r-code/packages for carrying out analysis? Preferably this would have examples from real experimental data of two or more competing species... In discrete time,

[R] Matrix Help

2011-02-20 Thread Dmitry Berman
Listers, I have a simple matrix: -- m -c(1:7) m - cbind(m) m [1,] 1 [2,] 2 [3,] 3 [4,] 4 [5,] 5 [6,] 6 [7,] 7 --- I want to add a second column using: [[alternative HTML version deleted]]

Re: [R] Matrix Help

2011-02-20 Thread Dmitry Berman
On Sun, Feb 20, 2011 at 5:55 PM, Dmitry Berman ravenb...@gmail.com wrote: Listers, I have a simple matrix: -- m -c(1:7) m - cbind(m) m [1,] 1 [2,] 2 [3,] 3 [4,] 4 [5,] 5 [6,] 6 [7,] 7 --- I want to add a second

Re: [R] Matrix Help

2011-02-20 Thread David Winsemius
On Feb 20, 2011, at 5:56 PM, Dmitry Berman wrote: On Sun, Feb 20, 2011 at 5:55 PM, Dmitry Berman ravenb...@gmail.com wrote: Listers, I have a simple matrix: -- m -c(1:7) m - cbind(m) m [1,] 1 [2,] 2 [3,] 3 [4,] 4 [5,] 5 [6,] 6 [7,] 7

Re: [R] Matrix Help

2011-02-20 Thread Mark Knecht
On Sun, Feb 20, 2011 at 2:56 PM, Dmitry Berman ravenb...@gmail.com wrote: On Sun, Feb 20, 2011 at 5:55 PM, Dmitry Berman ravenb...@gmail.com wrote: Listers, I have a simple matrix: -- m -c(1:7) m - cbind(m) m [1,] 1 [2,] 2 [3,] 3 [4,] 4 [5,] 5 [6,]

Re: [R] barplot, different color for shading lines and bar

2011-02-20 Thread Jannis
The easiest solution may be using par(new=TRUE) and to overlay a coloured barplot with a separate shaded barplot HTH Jannis On 02/19/2011 10:58 PM, Markus Loecher wrote: Dear all, might there be a modified barplot function out there which allows the user to specify a fill color for the

[R] QuadTree

2011-02-20 Thread Jaimin Dave
Could any one tell me how to implement QuadTree in R? Or are there any packages avaialble to implement it in R. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Same color key for multiple lattice contour plots

2011-02-20 Thread joepvanderzanden
Hi all, I'm trying to make multiple lattice contour plots which have the same color key, to allow good comparisons. However, I run into some problems when fitting the plots to the color key. Basically my strategy to tackle this problem was: 1) define a color key for all plots; 2) calculate the

[R] list of features from svmpath?

2011-02-20 Thread Angel Russo
How can I get the list of non-zero features from svmpath at any given lambda? All I get is following information and information about what features were selected. In Iris example, we have 4 features and 60 cases. In my own example which is 200cases by 300 features, I can't figure out how to print

[R] Tips to export R plots (dotplot function) into latex

2011-02-20 Thread Antonio Paredes
I'm looking for some tips on how to export R plots into latex. I can't centered the plots in latex (shift to the right). -- -Tony [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Generating uniformly distributed correlated data.

2011-02-20 Thread Søren Faurby
Thanks to everybody for helpfull answers. In case other people want to generate similar data at one time The one function I have found without any apparant bias ( such as extreme clustering of the datapoints along one or both diagonals in plot(x,y) or a slight bias in the generated

Re: [R] Confidence Intervals on Standard Curve

2011-02-20 Thread Ben Ward
On 20/02/2011 18:52, David Winsemius wrote: On Feb 20, 2011, at 1:27 PM, Ben Ward wrote: However, the Y ~ X + Y^2 Produces the best fitting line - it is pretty much on the data points - I'm trying to make a standard curve, with which to take readings from a spectrophotometer off of.

Re: [R] Seeking help in Package development

2011-02-20 Thread Mike Marchywka
Date: Sun, 20 Feb 2011 15:56:41 +0100 From: lig...@statistik.tu-dortmund.de To: jwiley.ps...@gmail.com CC: r-help@r-project.org Subject: Re: [R] Seeking help in Package development May I add that the best documentation for building

Re: [R] Tips to export R plots (dotplot function) into latex

2011-02-20 Thread Ista Zahn
This sounds more like a LaTeX question than an R question... \begin{center} \includegraphics{...} \end{center} If you had something else in mind please post more details. Best, Ista On Mon, Feb 21, 2011 at 1:03 AM, Antonio Paredes antonioparede...@gmail.com wrote: I'm looking for some tips on

Re: [R] barplot, different color for shading lines and bar

2011-02-20 Thread Dennis Murphy
Hi: This isn't hard to do with ggplot2. Here's a toy example: d - data.frame(gp = LETTERS[1:4], frq = c(10, 25, 30, 20)) library(ggplot2) # The fill aesthetic colors the bars, the colour aesthetic does the same for the borders. # (1) Same color for both, use alpha transparency: ggplot(d,

Re: [R] Plotting individual trajectories from individual growth model

2011-02-20 Thread Dennis Murphy
Hi: These are sometimes called 'spaghetti plots'; here is a variation on an example in the ggplot2 book by Hadley Wickham using the Oxboys data from package nlme: library(ggplot2) data('Oxboys', package = 'nlme') g - ggplot(Oxboys, aes(x = age, y = height)) g + geom_line(aes(group = Subject)) +

Re: [R] How to change dataframe to tables

2011-02-20 Thread Lao Meng
Thanks! It works well. 2011/2/18 Dimitris Rizopoulos d.rizopou...@erasmusmc.nl say, 'Dat' is your data frame, then one way to do it is: with(Dat, tapply(freq, list(hair, eye, sex), c)) I hope it helps. Best, Dimitris On 2/18/2011 8:50 AM, Lao Meng wrote: The data is in the

Re: [R] How to change dataframe to tables

2011-02-20 Thread Lao Meng
Thanks! It works well. 2011/2/18 Henrique Dallazuanna www...@gmail.com Try this: xtabs(Freq ~ Hair + Eye + Sex, Dat) Using Dimitri's Dat example. On Fri, Feb 18, 2011 at 5:50 AM, Lao Meng laomen...@gmail.com wrote: The data is in the attachment. What I wanna get is: , , Sex =

Re: [R] How to change dataframe to tables

2011-02-20 Thread Lao Meng
Well,it's my daily work on duty,not homework:) 2011/2/18 Dennis Murphy djmu...@gmail.com This is a built-in dataset in R - see ?HairEyeColor and str() it. I smell homework... Dennis On Thu, Feb 17, 2011 at 11:50 PM, Lao Meng laomen...@gmail.com wrote: The data is in the attachment.

[R] Error in R-SVM help:

2011-02-20 Thread Angel Russo
Greetings: I am trying to use your R code for R-SVM as follows. Why it dosen't print the LOO.error and the list of features? http://www.stanford.edu/group/wonglab/RSVMpage/R-SVM.html My training data as follows contains 142 cases and 264 features. instead I get en error as below invalid