[R] Generate variable with Bivariate Normal Distribution

2010-10-20 Thread สถาบันวิจัยและพัฒนา มหาวิทยาลัยราชภัฏอุบลร าชธานี
Dear All I want to generate variable with Bivariate Normal Distribution by use mean1 = a, variance1 = b, mean2 = c, variance2 = d, rho = e. How I can do this. Many Thanks. IRD [[alternative HTML version deleted]]

Re: [R] is get() really what I want here?

2010-10-20 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 20.10.2010 07:58:29: Hi Josh, What I'm really trying to do is to refer to objects whose names I have stored in a vector. This example was arbitrary. I do a lot of looping through files in the working directory, or through objects in the namespace,

Re: [R] is get() really what I want here?

2010-10-20 Thread Joshua Wiley
On Tue, Oct 19, 2010 at 10:58 PM, Daniel Weitzenfeld dweitzenf...@gmail.com wrote: Hi Josh, What I'm really trying to do is to refer to objects whose names I have stored in a vector.  This example was arbitrary. I do a lot of looping through files in the working directory, or through objects

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread ottorino
Il giorno mar, 19/10/2010 alle 11.12 -0700, Dieter Menne ha scritto: Thanks Dieter for your help, but unfortunately your suggestion results only in changing the color of the *lines* and not the color of the *area* of the polygon. I also tried to call col from within the panel.superpose

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread Dieter Menne
Ottorino-Luca Pantani wrote: Thanks Dieter for your help, but unfortunately your suggestion results only in changing the color of the *lines* and not the color of the *area* of the polygon. The following complete code works for me. Do you have the current version of lattice/R

Re: [R] Generate variable with Bivariate Normal Distribution

2010-10-20 Thread Gregor
You could e.g. use the package mvtnorm (not horribly fast, but handy): (assuming that rho is the correlation) library(mvtnorm) m - c(mean1, mean2) #mean vector cov - rho*sqrt(variance1*variance2) sig - matrix(c(variance1, cov, cov, variance2), nrow=2) #covariance matrix rmvnorm(100, mean=m,

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread ottorino
Il giorno mer, 20/10/2010 alle 00.05 -0700, Dieter Menne ha scritto: The following complete code works for me. Do you have the current version of lattice/R installed? So the problem could be somewhere else. I suspected some of this kind. RShowDoc(NEWS, package = lattice) tell me that is

Re: [R] plot CI and mortality rate

2010-10-20 Thread RINNER Heinrich
You could also use lattice + Hmisc: # Fake data (taken from Dennis Murphy's reply): mortrate - round(runif(100), 3) moe = 1.96 * sqrt(mortrate * (1 - mortrate))/10 dd - data.frame(rate = mortrate, CI.lower = mortrate - moe, CI.upper = mortrate + moe, hosp = factor(paste('H', 1:100, sep = ''))) #

Re: [R] Adding Legend about two quantile lines at ggplot

2010-10-20 Thread Dennis Murphy
Hi: scale_manual() is a little tricky when you build the legend from within the plot. I used shorter labels than you, but this worked for me: ggplot(mydata, aes(y=score2, x=score1)) + geom_point() + stat_quantile(quantiles=c(0.50), aes(colour='red'), size = 1) +

[R] CI using ci.numeric

2010-10-20 Thread David A.
Hi, I am trying to calculate confidence intervals using ci.numeric from epicalc package. If I generate a normal set of data and find the 99% and 95% CI, they seem too narrow to me. Am I doing something wrong?? The IQR goes from -0.62 to 0.62, so I thought the CI limits should be more extreme

[R] Regarding RDCOMClient package

2010-10-20 Thread zhongli.xu
Hi all, We currently faced a problem about how to pass a matrix with different types to a COM function call thru the RDCOMClient asCOMArray(). As we all know that matrix in R can't hold of elements with different types. So we managed to create a matrix of lists: rates - matrix(

Re: [R] Accessing table elements and escape characters

2010-10-20 Thread Dieter Menne
sachinthaka.abeywardana wrote: I get the error: A-read.table(P:/temp.csv,header=TRUE, sep=,); Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 11018 did not have 85 elements but when i open it in excel everything is fine. Better open it with

Re: [R] nls optimize

2010-10-20 Thread Muhammad Rahiz
That works - Thanks Ravi. Muhammad Rahiz On Tue, 19 Oct 2010, Ravi Varadhan wrote: You can do this. dsm = c(800,600,NA,525,NA,450,400,NA,NA,NA,0) s3 = seq(0.05,1.05,0.1) plot(s3,dsm,col=blue,las=1,xlab=fraction,ylab=distance (km)) fc - function(x,a,b){a*exp(-b*x)} fm -

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread Dennis Murphy
Hi Dieter: I think the OP wanted both lines and shading; from your code I could get the shading but not the lines. This is what it took for me to get the lines (note the type and col.line changes in xyplot() ): panel.bands - function(x, y, upper, lower, subscripts, ..., font,

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread Dieter Menne
djmuseR wrote: Hi Dieter: I think the OP wanted both lines and shading; from your code I could get the shading but not the lines. This is what it took for me to get the lines (note the type and col.line changes in xyplot() ): xyplot(est ~ x | cond, group = grp, data = data, type =

[R] problem with predict(mboost,...)

2010-10-20 Thread LWF
Hi, I use a mboost model to predict my dependent variable on new data. I get the following warning message: In bs(mf[[i]], knots = args$knots[[i]]$knots, degree = args$degree, : some 'x' values beyond boundary knots may cause ill-conditioned bases The new predicted values are partly

Re: [R] lattice: dots from xyplot to xscale.components

2010-10-20 Thread Deepayan Sarkar
On Wed, Oct 13, 2010 at 3:46 AM, Mikhail Titov m...@gmx.us wrote: Hello! I posted a feature request at lattice page on r-forge at https://r-forge.r-project.org/tracker/index.php?func=detailaid=1127group_id=638atid=2570 , but I decided to duplicate it here to make sure that I understand

[R] rowsum

2010-10-20 Thread xtracto
Hello, I am trying to achieve something which I *think* is possible using rowsum, but a little help should be useful: Consider the following dataframe DF0: A B C 89 1 140 89 06 20 89 29 137 89 52 13 89 57 10 89 97 23 89

[R] Plot help

2010-10-20 Thread Peter Francis
Dear List, I am relatively new to R and am trying to create more attractive plots than excel can manage! I have looked through the various programmes ggplot, lattice, hmisc etc but my case seems to be not metnioned, maybe it is but i have not noticed - if this is the case i apologise.

Re: [R] R 2.12.0 and JGR

2010-10-20 Thread kat
hi rob, i encountered the same problem on a students laptop and have no idea anymore after trying updating, re-installing and just about everything. like you say, the jri.dll file is exactly at the same place as on your machine. let me know if and how you solved it! thanks, kat -- View this

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread Dennis Murphy
Works for me! Thanks, Dieter! Regards, Dennis On Wed, Oct 20, 2010 at 2:07 AM, Dieter Menne dieter.me...@menne-biomed.dewrote: djmuseR wrote: Hi Dieter: I think the OP wanted both lines and shading; from your code I could get the shading but not the lines. This is what it took

Re: [R] rowsum

2010-10-20 Thread Dennis Murphy
Hi: Here's one way, although it can be improved a bit. d1 - aggregate(C ~ A, data = subset(DF0, B == 1), FUN = sum) d2 - subset(DF0, B != 1) # B not in d1, so need to replace it d1 A C 1 52 124 2 57 64 3 89 192 d1$B - rep(1, nrow(d1)) d1 - d1[, c(1, 3, 2)] # reorder columns to permit

[R] Job for senior quantitative analyst in Dublin

2010-10-20 Thread Treacy, Glenn
Senior Quantitative Research Analyst Based in Irish Life Investment Managers, Lower Beresford Place, Dublin 1 Irish Life Investment Managers (ILIM), the investment management company within the Irish Life Permanent Group manages assets of circa EUR30bn and provides fund management

Re: [R] rowsum

2010-10-20 Thread Dennis Murphy
Or even better (doh!)... library(plyr) ddply(DF0, .(A, B), summarise, C = sum(C)) A B C 1 52 1 124 2 52 59 38 3 52 97 75 4 57 1 64 5 57 6 26 6 57 114 12 7 89 1 192 8 89 6 20 9 89 29 137 10 89 52 13 11 89 57 10 12 89 97 23 which means that aggregate(),

Re: [R] points( .... pch=2) substitue pch with image

2010-10-20 Thread Knut Krueger
Am 19.10.2010 23:23, schrieb Greg Snow: Look at my.symbols and ms.image in the TeachingDemos package. Thank you, that's I was looking for. Knut __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] rowsum

2010-10-20 Thread Dennis Murphy
Proof of last assertion - sorry, I just had to follow through... library(data.table) DT0 - data.table(DF0, key = 'A, B') DT0[, sum(C), by = 'A, B'] A B V1 [1,] 52 1 124 [2,] 52 59 38 [3,] 52 97 75 [4,] 57 1 64 [5,] 57 6 26 [6,] 57 114 12 [7,] 89 1 192 [8,] 89 6

Re: [R] Plot help

2010-10-20 Thread Dennis Murphy
Hi: Your confidence intervals are so short that the size of the point in the graphics region covers the endpoints! You also have a wide range of simulated means (0 - 52) and actual values (0 - 54). Here are some measures of your CIs: with(simvsact, max(simCI.upper - simCI.lower))# maximum

Re: [R] rowsum

2010-10-20 Thread xtracto
This summaryBy worked wonders! Thanks a lot djmuseR, I own you a beer! library(doBy) summaryBy(C ~ A + B, data = DF0, FUN = sum) A B C.sum 1 52 1 124 2 52 5938 3 52 9775 4 57 164 5 57 626 6 57 11412 7 89 1 192 8 89 620 9 89 29 137 10 89

Re: [R] is there a way to update both packages if they occur in 2 libraries?

2010-10-20 Thread Uwe Ligges
update.packages() updates all packages in all libraries listed in .libPaths() unless you specify an explicit library. It may happen that the version number has not changed and you just want to reinstall for your upgraded R. In that case use: update.packages(checkBuilt=TRUE) Best, Uwe Ligges

Re: [R] is there a way to update both packages if they occur in 2 libraries?

2010-10-20 Thread Chris Howden
Thanks Uwe, It may operate like that on most peoples machines, but either its not operating like that on mine. Or I have another problem :-( As u can see from my code below I've run update.packages(checkBuilt=TRUE) and my 'private' library is in my LibPaths()... However when I try to load the

Re: [R] rowsum

2010-10-20 Thread jim holtman
Another option to consider: x A B C 1 89 1 140 2 89 6 20 3 89 29 137 4 89 52 13 5 89 57 10 6 89 97 23 7 89 1 37 8 89 1 12 9 89 1 3 10 52 1 11 11 52 1 31 12 52 1 16 13 52 1 6 14 52 1 10 15 52 1 13 16 52 1 10 17 52 1 25 18 52 1 2

Re: [R] is there a way to update both packages if they occur in 2 libraries?

2010-10-20 Thread Uwe Ligges
On 20.10.2010 13:59, Chris Howden wrote: Thanks Uwe, It may operate like that on most peoples machines, but either its not operating like that on mine. Or I have another problem :-( As u can see from my code below I've run update.packages(checkBuilt=TRUE) and my 'private' library is in my

[R] combine vectors in an alternating way

2010-10-20 Thread fugelpitch
I have two vectors min 0.2, 0.3, 0.6, 0.1 max 0.4,0.5,0.7,0.4 Is there a way to combine these two vector so that the values will be taken from the vectors alternating so that I will get a new minmaxminmaxminmax-vector? minmax 0.2,0.4,0.3,0.5,0.6,0.7,0.1,0.4 Any help is much appreciated --

Re: [R] is there a way to update both packages if they occur in 2 libraries?

2010-10-20 Thread Chris Howden
Thanks Uwe, I was wondering if it was something like that. I'll delete the base packages from my personal library. And just as a comment...although I'm a rather new user to R (as U may have guessed). I gather that every now and then popular and necessary packages are added to base R. So I'm

Re: [R] combine vectors in an alternating way

2010-10-20 Thread Dimitris Rizopoulos
one way is the following: min.x - c(0.2, 0.3, 0.6, 0.1) max.x - c(0.4, 0.5, 0.7, 0.4) c(rbind(min.x, max.x)) I hope it helps. Best, Dimitris On 10/20/2010 2:13 PM, fugelpitch wrote: I have two vectors min 0.2, 0.3, 0.6, 0.1 max 0.4,0.5,0.7,0.4 Is there a way to combine these two

Re: [R] combine vectors in an alternating way

2010-10-20 Thread Henrique Dallazuanna
Try this: c(matrix(c(Min, Max), 2, byrow = T)) On Wed, Oct 20, 2010 at 10:13 AM, fugelpitch jo...@runtimerecords.netwrote: I have two vectors min 0.2, 0.3, 0.6, 0.1 max 0.4,0.5,0.7,0.4 Is there a way to combine these two vector so that the values will be taken from the vectors

Re: [R] combine vectors in an alternating way

2010-10-20 Thread Ben Bolker
fugelpitch jonas at runtimerecords.net writes: I have two vectors min 0.2, 0.3, 0.6, 0.1 max 0.4,0.5,0.7,0.4 Is there a way to combine these two vector so that the values will be taken from the vectors alternating so that I will get a new minmaxminmaxminmax-vector? minmax

[R] Function execution on package load?

2010-10-20 Thread Johannes Graumann
Hi, Can anyone give me a pointer on howto make a package execute a function at loading? Following an older post (http://bit.ly/cS1Go4), I'd like to do something along the lines of .localstuff - new.env() .localstuff$OftenUsedData - read.csv(...) upon loading the package ... Thanks, Joh

Re: [R] is there a way to update both packages if they occur in 2 libraries?

2010-10-20 Thread Prof Brian Ripley
On Wed, 20 Oct 2010, Uwe Ligges wrote: On 20.10.2010 13:59, Chris Howden wrote: Thanks Uwe, It may operate like that on most peoples machines, but either its not operating like that on mine. Or I have another problem :-( As u can see from my code below I've run

[R] dynamic factor analyis

2010-10-20 Thread Ulrike Scharfenberger
Dear R users, I want to model some time series data with the help of dynamic factor analysis, as described by A.F.Zuur in Dynamic factor analysis to estimate common trends in fisheries time series. Unfortunately the only implementation of the method I could find sofar is in the non free software

Re: [R] R 2.12.0 and JGR

2010-10-20 Thread Dennis Murphy
Hi: Even more fun with Deducer in 2.12.0: I downloaded the JGR 64-bit executable from R-forge and installed the latest binary of the package from there a half hour ago. When I try the JGR executable, I get the same error that Rob and Kat reported. When I try to call Deducer from within R-2.12.0

[R] Using Windows Tahoma Font for Graphics Text

2010-10-20 Thread Ethan Arenson
Hi. I want to use the text() command to produce graphics text in the (Windows) font Tahoma, but I don't know how to do this. I appreciate any suggestions/ideas you may have. All Best, Ethan [[alternative HTML version deleted]] __

[R] number format, writing 1e-5 instead of 0.00001

2010-10-20 Thread skan
Hello I've used read.table to read a file that contains numbers such as 0.1 when I write them back with write.table those numbers appear as 1e-5 How can I keep the old format? thanks -- View this message in context:

[R] How to select not continous rows?

2010-10-20 Thread skan
Hello How can I select several not continuous rows ? If I wanted to select rows 1 to 7 I'll write mydata[,1:7] But what if I need to select rows 1 to 5 and 10 to 15? -- View this message in context: http://r.789695.n4.nabble.com/How-to-select-not-continous-rows-tp3003840p3003840.html Sent

Re: [R] CI using ci.numeric

2010-10-20 Thread Łukasz Ręcławowicz
2010/10/20 David A. dasol...@hotmail.com I am trying to calculate confidence intervals using ci.numeric from epicalc package. If I generate a normal set of data and find the 99% and 95% CI, they seem too narrow to me. Am I doing something wrong?? Yes. set.seed(123) x- rnorm(200,0,1)

[R] S: appropriate significance tests

2010-10-20 Thread soeren . vogel
Hello (1) How can I compare two Pearson correlation coefficients for significant differences without the use of the raw data? (2) How can I compare two linear regression coefficients for significant differences without the use of the raw data? (3) How can I compare two multiple correlation

[R] (no subject)

2010-10-20 Thread Gouveia, Ana
Does anyone know the why for this error when doing a logistic regression with binomial family? Thank you Kind regards ana Error in family$linkfun(mustart) : Value -1717986918 out of range (0, 1) in attachment is my data set and the comands I used were for adults

Re: [R] Using Windows Tahoma Font for Graphics Text

2010-10-20 Thread Prof Brian Ripley
1) See the rw-FAQ and read and edit the file etc/Rdevga 2) Set up your own font family: see ?windowsFont. Both are mentioned in the obvious place: the help file for ?windows (see the posting guide). On Wed, 20 Oct 2010, Ethan Arenson wrote: Hi. I want to use the text() command to produce

[R] Please help: ANOVA with SS Type III for unequal sample sized data

2010-10-20 Thread BumSeok Jeong
Dear R experts, I'm beginner. My question about ANOVA for unequal sample sized data should be obsolete but I can not clarify it. I have a dataset from 23 males and 18 females. I measured one condition('cond') with 4 levels. So I'd like to see main effect of gender, cond and gender by cond

Re: [R] How to select not continous rows?

2010-10-20 Thread Ista Zahn
Hi, On Wed, Oct 20, 2010 at 9:25 AM, skan juanp...@gmail.com wrote: Hello How can I select several not continuous rows ? If I wanted to select rows 1 to 7 I'll write mydata[,1:7] But what if I need to select rows 1 to 5 and 10 to 15? mydata[, c(1:5, 10:15)] -Ista -- View this

[R] Plot help

2010-10-20 Thread Peter Francis
Dear List, I am relatively new to R and am trying to create more attractive plots than excel can manage! I have looked through the various programmes ggplot, lattice, hmisc etc but my case seems to be not metnioned, maybe it is but i have not noticed - if this is the case i apologise.

Re: [R] number format, writing 1e-5 instead of 0.00001

2010-10-20 Thread Henrique Dallazuanna
Try this: format(0.1, scientific = F) On Wed, Oct 20, 2010 at 11:21 AM, skan juanp...@gmail.com wrote: Hello I've used read.table to read a file that contains numbers such as 0.1 when I write them back with write.table those numbers appear as 1e-5 How can I keep the old

Re: [R] How to select not continous rows?

2010-10-20 Thread Dennis Murphy
mydata[c(1:5, 10:15), ] HTH, Dennis On Wed, Oct 20, 2010 at 6:25 AM, skan juanp...@gmail.com wrote: Hello How can I select several not continuous rows ? If I wanted to select rows 1 to 7 I'll write mydata[,1:7] But what if I need to select rows 1 to 5 and 10 to 15? -- View this

Re: [R] How to select not continous rows?

2010-10-20 Thread Henrique Dallazuanna
mydata[c(1:5, 10:15),] On Wed, Oct 20, 2010 at 11:25 AM, skan juanp...@gmail.com wrote: Hello How can I select several not continuous rows ? If I wanted to select rows 1 to 7 I'll write mydata[,1:7] But what if I need to select rows 1 to 5 and 10 to 15? -- View this message in

Re: [R] question on optim() fn.

2010-10-20 Thread Ravi Varadhan
Hi, You are doing the right thing by being concerned about the warning messages. The warning message of `NaN' usually arises due to illegal arithmetic operations (in the real number field) such as logarithm or square root of a negative number. This could happen during the intermediate stages of

Re: [R] Please help: ANOVA with SS Type III for unequal sample sized data

2010-10-20 Thread Ista Zahn
Hi Jeong, On Wed, Oct 20, 2010 at 5:25 AM, BumSeok Jeong bumseok.je...@gmail.com wrote: Dear R experts, I'm beginner. My question about ANOVA for unequal sample sized data should be obsolete but I can not clarify it. I have a dataset from 23 males and 18 females. I measured one

Re: [R] Plot help

2010-10-20 Thread jim holtman
I think that your first problem is that you have a very large range of values and the CIs are small in comparison, so you won't see any difference on the plots. Do you want to plot each of the 35 values showing the complete range and then where the actual value lies either inside/outside the

Re: [R] How to select not continous rows?

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 9:25 AM, skan wrote: Hello How can I select several not continuous rows ? If I wanted to select rows 1 to 7 I'll write mydata[,1:7] But what if I need to select rows 1 to 5 and 10 to 15? mydata[ , c(1:5, 10:15) ] -- David Winsemius, MD West Hartford, CT

[R] fitted from plm

2010-10-20 Thread max . e . brown
Hi, I am estimating a (fixed-effects) model with plm, for which I would like to get the fitted values. If I call fitted() on my estimated model, it returns NULL. How do I get the fitted values out of the plm object? Thanks. Max __

Re: [R] number format, writing 1e-5 instead of 0.00001

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 9:21 AM, skan wrote: Hello I've used read.table to read a file that contains numbers such as 0.1 when I write them back with write.table those numbers appear as 1e-5 How can I keep the old format? To change globally for the session: ?options options(scipen

Re: [R] CI using ci.numeric

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 4:10 AM, David A. wrote: Hi, I am trying to calculate confidence intervals using ci.numeric from epicalc package. If I generate a normal set of data and find the 99% and 95% CI, they seem too narrow to me. Am I doing something wrong?? The next sentence suggests that

Re: [R] problem with predict(mboost,...)

2010-10-20 Thread Benjamin Hofner
Hi Tim, you have two problems at the same time: 1.) The warning you get means that you predictor (e.g. predictor1) has another range in the training set than in the test set. In this case you have data in you test set that lies outside of the range of the training set (for predictor1). This

Re: [R] (no subject)

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 5:03 AM, Gouveia, Ana wrote: Does anyone know the why for this error when doing a logistic regression with binomial family? Thank you Kind regards ana Error in family$linkfun(mustart) : Value -1717986918 out of range (0, 1) in attachment is my data set and the comands

Re: [R] How to select not continous rows?

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 10:01 AM, David Winsemius wrote: On Oct 20, 2010, at 9:25 AM, skan wrote: Hello How can I select several not continuous rows ? If I wanted to select rows 1 to 7 I'll write mydata[,1:7] But what if I need to select rows 1 to 5 and 10 to 15? mydata[ , c(1:5, 10:15) ]

[R] remove black square from factor plot

2010-10-20 Thread fugelpitch
I have a factor which is species and the variables are a few sites where this species live. When I plot: plot(species.factor, minlatitudemaxlatitude) the plot produced is automatically a boxplot which shows the range of the species (which is what I want). However, in the thin box which is

[R] create a list fails

2010-10-20 Thread Maas James Dr (MED)
I can not understand why this fails faicoutput2 - list(stuff21 = as.numeric(faicout$coefficients[2]), + stuff31=as.numeric(faicout$coefficients[3]), + stuff41=as.numeric(faicout$coefficients[4]), + stuff32=(stuff21-stuff31), +

Re: [R] subtraction based on two groups in a dataframe

2010-10-20 Thread 1Rnwb
I want the reshaped data to look like this. plate.id HYBwell.id rlt1.control1 well.id rlt1.control1 well.idrlt1.disease1 well.id rlt1.disease2 1 P1 SKOV3hyb A10.190 A2 0.210 B10.217

[R] Multivariate GARCH

2010-10-20 Thread Giuseppe Grillo
HI! I'm student of university and i need an example (an application) of Multivariate GARCH model for replicate it in my thesis. It's better with model CCC e DCC. Best Regards Giuseppe for answer: bepperozz...@hotmail.com [[alternative HTML version deleted]]

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread ottorino
Il giorno mer, 20/10/2010 alle 03.05 -0700, Dennis Murphy ha scritto: Works for me! Thanks, Dieter! Hi all. Thanks again to you both for the help. It was a problem due to a lack in updating ubuntu. After the upgrade to Lucid I entirely forgot to update /etc/apt/sources.list with the new lines.

[R] simple function can't find weights

2010-10-20 Thread Dimitri Liakhovitski
Hello! Here is my data: x-data.frame(y=rnorm(100,0,1),a=rnorm(100,1,1),b=rnorm(100,2,1),weights=runif(100)) data.for.regression-x[1:3] names(data.for.regression) myweights-x$weights I run simple weighted regression and everything is fine: reg1-lm(y~., data.for.regression, weights=myweights)

Re: [R] create a list fails

2010-10-20 Thread jim holtman
I do not see that it has been created yet. You my have defined it earlier in the 'list' expression, but as an object it is not available yet. You might have to do something like uwing 'within' x - list() x - within(x, { + a = 1:10 + b = 11:20 + c = a + b + d = a * b}) x $d [1] 11 24 39

Re: [R] Chron object in time series plot

2010-10-20 Thread Manta
Sorry R community, I am still stucked wit this. How can avoid the x-limit error? -- View this message in context: http://r.789695.n4.nabble.com/Chron-object-in-time-series-plot-tp3002285p3004070.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] remove black square from factor plot

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 10:45 AM, fugelpitch wrote: I have a factor which is species and the variables are a few sites where this species live. When I plot: plot(species.factor, minlatitudemaxlatitude) the plot produced is automatically a boxplot which shows the range of the species (which

Re: [R] fitted from plm

2010-10-20 Thread Achim Zeileis
On Wed, 20 Oct 2010, max.e.br...@gmail.com wrote: Hi, I am estimating a (fixed-effects) model with plm, for which I would like to get the fitted values. If I call fitted() on my estimated model, it returns NULL. How do I get the fitted values out of the plm object? I think there is

[R] Initiating graphics recording in RGraphics window via a script

2010-10-20 Thread Dimitri Liakhovitski
Hello! Sometimes I have to produce several graphs at a time, but need to be able to see them all one by one in the RGraphics window. I do it manually like this: I create some plot: plot(1:5) It opens the RGraphics window. I click on the window, go (in the menue) to History-Recording, and then

Re: [R] create a list fails

2010-10-20 Thread David Winsemius
I suspect that Dr. Jim is conflating the behavior of R w.r.t. arguments in a function call (where assignment to one argument can be seen by another argument) with the behavior of naming items in a list expression. -- David. On Oct 20, 2010, at 11:01 AM, jim holtman wrote: I do not see

Re: [R] Initiating graphics recording in RGraphics window via a script

2010-10-20 Thread jim holtman
?windows On Wed, Oct 20, 2010 at 11:19 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! Sometimes I have to produce several graphs at a time, but need to be able to see them all one by one in the RGraphics window. I do it manually like this: I create some plot:

[R] preferred x-delimited data format for R?

2010-10-20 Thread Liviu Andronic
Dear all What is the preferred spreadsheet-like x-delimited data format for use with R? Should I prefer tab-, comma-, space- or some_other_delimitor-seprated data? I'm asking this because I've been once bitten by CSV data containing ` ' ' (apostrophe) symbols that R couldn't easily digest.

Re: [R] preferred x-delimited data format for R?

2010-10-20 Thread Gabor Grothendieck
On Wed, Oct 20, 2010 at 11:25 AM, Liviu Andronic landronim...@gmail.com wrote: Dear all What is the preferred spreadsheet-like x-delimited data format for use with R? Should I prefer tab-, comma-, space- or some_other_delimitor-seprated data? I'm asking this because I've been once bitten by

Re: [R] create a list fails

2010-10-20 Thread Jeff Newmiller
Your first example is all one statement. Within that statement you are defining elements of a list. Unfortunately you are defining some of those elements in terms of others, but they don't exist until the statement has completed. If you break the statement up into an initial list formation

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread Deepayan Sarkar
On Wed, Oct 20, 2010 at 7:53 AM, ottorino ottorino-luca.pant...@unifi.it wrote: Il giorno mer, 20/10/2010 alle 03.05 -0700, Dennis Murphy ha scritto: Works for me!  Thanks, Dieter! Hi all. Thanks again to you both for the help. It was a problem due to a lack in updating ubuntu. After the

Re: [R] Chron object in time series plot

2010-10-20 Thread Robert Baer
It seems David and Phil have given you all the pieces and you are not listening. Try: h = sprintf('%06d', seq(07,18, by=1) ) # Note that h is text myseries=sample(1:12, 12) #fake data to plot tim=strptime(h,'%H%M%S') library(zoo) test=zoo(myseries, tim) plot(test) Rob

Re: [R] remove black square from factor plot

2010-10-20 Thread Jonas Josefsson
str(species.factor) Factor w/ 81 levels Acer_platanoides_Bl,..: 12 12 55 55 76 76 52 52 67 67 ... str(minmax) int [1:162] 6163779 7262127 6163779 7422941 6163779 6644861 6163779 6644861 6163779 7262127 ... That is, my factor is the species listed two times each Acer_platanoides_Bl

Re: [R] Initiating graphics recording in RGraphics window via a script

2010-10-20 Thread Dimitri Liakhovitski
Thanks a lot for the helpful reference, Jim. So, the solution is very simple: windows(record=TRUE) for(i in 10:12){ plot(1:i,main=paste(Plot ,i,sep=)) } Dimitri On Wed, Oct 20, 2010 at 11:24 AM, jim holtman jholt...@gmail.com wrote: ?windows On Wed, Oct 20, 2010 at 11:19 AM, Dimitri

[R] lme with log-normal distribution of parameters

2010-10-20 Thread Hoai Thu Thai
Dear R-users, Do you know if we can use the function lme in R for log-normal distribution of parameters as used in Nonmem ? theta=theta0*exp(eta) In our model, the parameters follow the log-normal distribution so it's not reasonable to deal with normal distribution which gives us negative

Re: [R] Chron object in time series plot

2010-10-20 Thread Manta
Well, I was listening, but the error was due to the extra function 'format'. Without that, it works perfectly. Thanks for the help, Marco -- View this message in context: http://r.789695.n4.nabble.com/Chron-object-in-time-series-plot-tp3002285p3004177.html Sent from the R help mailing list

Re: [R] Chron object in time series plot

2010-10-20 Thread Gabor Grothendieck
On Wed, Oct 20, 2010 at 11:08 AM, Manta mantin...@libero.it wrote: Sorry R community, I am still stucked wit this. How can avoid the x-limit error? If the problem is that you wish to create and plot an hourly series at 12 successive hours starting at 7am then here are three ways depending on

Re: [R] R 2.12.0 and JGR

2010-10-20 Thread Simon Urbanek
On Oct 20, 2010, at 9:14 AM, Dennis Murphy wrote: Hi: Even more fun with Deducer in 2.12.0: I downloaded the JGR 64-bit executable from R-forge and installed the latest binary of the package from there a half hour ago. The old 1.61 loader only supports R 2.12. You'll need the new

[R] Problem exporting data using write.foreign

2010-10-20 Thread Andrew Miles
My question is about the write.foreign() command in the foreign package. I use a command like the following to try and output data and a code file to read my data into SAS. write.foreign(data.frame.object, datafile=filepath, codefile=filepath, package=SAS, dataname=myData) With my data

[R] ascii or regex code for alt-enter for Excel

2010-10-20 Thread Mark Kimpel
I need to write a table that can be opened in Excel or OpenOffice such that there are newlines embedded within cells. After much Googling and futzing, I can't figure out how to do this. The way to do this within Excel is alt-Enter and I've tried '/n', '/n/r', '/r/n' per some web suggestions

[R] need for speed on grid.rect

2010-10-20 Thread Mikkel Grum
When I use grid.rect to print a multi-coloured grid, it is incredibly slow compared to a single colour grid, or even a two colour grid. I've set out some simplified examples below. This is something I run literally thousands of times a day, so I would greatly appreciate any hints on how I

Re: [R] dot plot by group

2010-10-20 Thread Deepayan Sarkar
On Mon, Oct 11, 2010 at 12:55 PM, casperyc caspe...@hotmail.co.uk wrote: And now I just wonder why the ' bty='n' ' won't work? I did dotplot(BATCH~RESPONSE,data=d,subset=Type=='SHORT',bty='n') and tried other bty parameters, none is working As David says, par settings don't work in

Re: [R] Problem exporting data using write.foreign

2010-10-20 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Andrew Miles Sent: Wednesday, October 20, 2010 10:10 AM To: r-help@r-project.org Subject: [R] Problem exporting data using write.foreign My question is about the

Re: [R] ascii or regex code for alt-enter for Excel

2010-10-20 Thread Duncan Murdoch
On 20/10/2010 1:04 PM, Mark Kimpel wrote: I need to write a table that can be opened in Excel or OpenOffice such that there are newlines embedded within cells. After much Googling and futzing, I can't figure out how to do this. The way to do this within Excel is alt-Enter and I've tried '/n',

[R] Getting the size of text

2010-10-20 Thread Barth B. Riley
Dear list I am interested n developing a graph using plot() and text() commands in which several text strings will be placed within the plot area I would like some way to get the size (width and height), either in pixels or using the plot's coordinate system, of text strings, based on the

Re: [R] fitted from plm

2010-10-20 Thread Millo Giovanni
Hello. Correct, IMHO: Achim's suggestion is the best way to get in-sample fitted values, w.r.t. e.g. direct calculation as yhat=X%*%coef, as it implicitly takes care of fixed effects etc.. A method for out-of-sample use is not implemented yet. It will eventually be, but there is no schedule for

Re: [R] Getting the size of text

2010-10-20 Thread Henrique Dallazuanna
See ?strwidth On Wed, Oct 20, 2010 at 3:36 PM, Barth B. Riley bbri...@chestnut.orgwrote: Dear list I am interested n developing a graph using plot() and text() commands in which several text strings will be placed within the plot area I would like some way to get the size (width and

Re: [R] ascii or regex code for alt-enter for Excel

2010-10-20 Thread William Dunlap
I think Excel wants a \n for newlines in a text cell entry but \r\n to separate rows of a csv file. You may have to open the file in binary mode and put in the \r\n at line ends by hand to achieve this from R, as it tranlates all \ns to \r\ns when writing them to a file. (\n is not the same as

Re: [R] dot plot by group

2010-10-20 Thread casperyc
Thanks. It was 'bty=n' on a text graph, I was just having fun with it. It does not really matter that much. CasperYC -- View this message in context: http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p3004323.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Problem exporting data using write.foreign

2010-10-20 Thread Andrew Miles
I was able to figure this one out. It turns out that truncation was not the problem, as I had no variables with names longer than 32 characters (that is quite a long name!). I document my process here so that future users with the same problem can benefit. First, I examined the code for

  1   2   >