[R] How to check for missing report pages per client

2010-10-20 Thread Pauline
Hi, Not sure how to go about checking for missing report pages per client. See example below; I like to extract client 730040, because page 46103 is missing. client page 730001 46101 730001 46102 730019 46101 730035 46101 730040 46101 730040 46102 730040 46104 730040 46105 73

Re: [R] remove black square from factor plot

2010-10-20 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 20.10.2010 17:43:27: > > 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 7262

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

2010-10-20 Thread Gabor Grothendieck
On Wed, Oct 20, 2010 at 7:11 PM, Mark Kimpel wrote: > I do wonder what ASCII character is represented in Windows with alt-Enter. Using Excel 2007 on Windows, Alt-Enter is char(10). In an empty sheet enter these three characters into A1: a alt-enter b and then in 3 other cells try this: =fi

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

2010-10-20 Thread sharkoil
Hi Ravi, Thanks a lot for your informations. I think you are right. Without the constraints of the parameters, it's easy to get the "NaN Produced" warning message. The pdfs I worked on are Burr, Lognormal and Inverse Gaussian distributions. Lognormal distribution is ok, but I always have warning

Re: [R] Help: Using vectorization method for vectors comparision

2010-10-20 Thread bruclee
Very Nice! Thanks a lot! Btw, I think "match" function should also do the work for the last two steps. :) -- View this message in context: http://r.789695.n4.nabble.com/Help-Using-vectorization-method-for-vectors-comparision-tp3004952p3005032.html Sent from the R help mailing list archive at Na

[R] using softmax in nnet

2010-10-20 Thread Raji
I run my data in nnet factor response (with 0 & 1 values) and explicitly put softmax=TRUE. I get the following error. nn <- nnet(as.factor(table[,8])~.,data=table,size=2,linout=FALSE,entropy=FALSE,softmax=TRUE,censored=FALSE,rang=0.7,Hess=FALSE,trace=FALSE,MaxNwts=1000,decay=0.1,maxit=1000,skip

Re: [R] Help: Using vectorization method for vectors comparision

2010-10-20 Thread Wu Gong
Hi Bruclee, ?rle may help. a <- c(5, 10, 13, 19, 23) b <- c(1, 4, 7, 9, 15) ab <- data.frame(value = c(a,b), type=c(rep(0,length(a)),rep(1,length(b ab <- ab[order(ab$value),] ab$v2 <- cumsum(ab$type) ab$matched <- rep(ab$value[ab$type==1],rle(ab$v2)$lengths) (result <- ab[ab$type==0,c("valu

[R] Fwd: HOW to use the survivalROC to get optimal cut-off values?

2010-10-20 Thread Qian
-- Forwarded message -- From: Qian Date: 2010/10/21 Subject: HOW to use the survivalROC to get optimal cut-off values? Dear sir, I am a student who want to use the time-dependent survivalROC package.according to the,reference material,it only gives a set of ordered cut-off values

[R] Help: Using vectorization method for vectors comparision

2010-10-20 Thread bruclee
I am trying to compare two sorted vectors, all elements in both vectors are not duplicated. Ex. a = c[5, 10, 13, 19, 23] b = c[1, 4, 7, 9, 15] For each element in a, i need find the max element in b which is smaller than it, so the short answer will look like [4, 9, 9, 15, 15]. I dont want to use

[R] Accuracy/Goodness of fit of nnet

2010-10-20 Thread Raji
Hi R-Helpers , am working on nnet package.Multinom() has an option for finding the goodness of fit by giving the AIC value. Does nnet also gives some value to determine the accuracy. If not, can you guide me with some procedure to figure out the accuracy/goodness of fit of nnet model? Thanks in a

Re: [R] rounding up (always)

2010-10-20 Thread jim holtman
why don't you just use 'pretty' > pretty(c(-1225, 2224)) [1] -1500 -1000 -500 0 500 1000 1500 2000 2500 > pretty(c(-4.28, 6.45)) [1] -6 -4 -2 0 2 4 6 8 > On Wed, Oct 20, 2010 at 8:38 PM, Dimitri Liakhovitski wrote: > Thank you for your help, everyone. > Actually, I am building a

Re: [R] help identifying clusters

2010-10-20 Thread Nikhil Kaza
Look at clustering task view http://cran.r-project.org/web/views/Cluster.html A simple way to do it is library(cluster) dat$cluster <- pam(dat, 3, stand=T)$clustering plot(dat$lon, dat$lat, col=dat$cluster) Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina n

Re: [R] rounding up (always)

2010-10-20 Thread Dimitri Liakhovitski
Thanks a lot, David - I'll try this solution. Dimitri On Wed, Oct 20, 2010 at 9:54 PM, David Winsemius wrote: > > On Oct 20, 2010, at 8:38 PM, Dimitri Liakhovitski wrote: > >> Thank you for your help, everyone. >> Actually, I am building a lot of graphs (in a loop) but the values on >> the y axes

Re: [R] rounding up (always)

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 8:38 PM, Dimitri Liakhovitski wrote: Thank you for your help, everyone. Actually, I am building a lot of graphs (in a loop) but the values on the y axes from graph to graph could range from [-5; 5] to [-10,000; 10,000]. So, I am trying to create ylim ranging from ymin to yma

Re: [R] how to connect to a remote PostgreSQL database from R on mac osx

2010-10-20 Thread Prasenjit Kapat
On Wed, Oct 20, 2010 at 6:30 PM, Simone Gabbriellini wrote: > Hello List, > > I would like to connect to a postgreSQL database on a remote server and I am > wondering what is the best package to do that. I have just installed RpgSQL, > RPostgreSQL, Rdbi and RODBC. I have used RPostgreSQL in the

Re: [R] rounding up (always)

2010-10-20 Thread Dimitri Liakhovitski
Thank you for your help, everyone. Actually, I am building a lot of graphs (in a loop) but the values on the y axes from graph to graph could range from [-5; 5] to [-10,000; 10,000]. So, I am trying to create ylim ranging from ymin to ymax such that they look appropriate for the range. For example,

Re: [R] efficient test for missing values (NAs)

2010-10-20 Thread Ali Tofigh
A small test indicates that the following may be the fastest method (although all are pretty fast) has.na <- !all(complete.cases(x)) Thanks Jim and Phil for your suggestions. /Ali On Wed, Oct 20, 2010 at 19:03, Jim Holtman wrote: > ?complete.cases > > Sent from my iPhone > > On Oct 20, 2010, at

[R] help identifying clusters

2010-10-20 Thread jonas garcia
Dear list: I have a dataset of geographical data that looks like this example data: dat<- data.frame( lon = c(rnorm(1000, mean=-10), rnorm(1000, mean=10), rnorm(1000, mean=5)), lat = c(rnorm(1000, mean=40), rnorm(1000, mean=30), rnorm(1000, mean=0))) plot(dat$lon, dat$lat) My positions are cl

[R] autoregressive functions

2010-10-20 Thread A Sdf
Hi all, I am sorry for bothering the list, but I hope one of its members can help me. Currently I am doing a spectral analysis with the help of R. The spectral density I have calculated as follows: (The vector q contain some testing numbers.) > q <- > c(28,28,26,19,16,24,26,24,24,29,29,2

Re: [R] loading workspace- getting annoying

2010-10-20 Thread Ted Harding
On 20-Oct-10 23:37:44, David Winsemius wrote: > On Oct 20, 2010, at 7:05 PM, sachinthaka.abeyward...@allianz.com.au > wrote: > >> I stupidly decided to save my last workspace (a large dataset) >> and every time I open R it loads it back in. Can I stop this? >> Also how do you clear variables. >>

[R] Lasso Logistic Regression - Query

2010-10-20 Thread Lars Bishop
Hi, Is it possible to include class factor inputs in a Logistic Regression model with the glmnet package? It only seems to allow for numeric inputs. Looks like the Penalized package does this? Any other package you would recommend for this purpose? Thanks in advance for any help. Lars.

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

2010-10-20 Thread Chris Howden
Thanks for the explanation Brian, I used the summary(packageStatus()) to have a look at what was available and in each library. And then deleted all libraries that came with R2.12.0 from my personal library. And everything now works. Chris Howden Founding Partner Tricky Solutions Tricky Soluti

Re: [R] loading workspace- getting annoying

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 7:05 PM, sachinthaka.abeyward...@allianz.com.au wrote: I stupidly decided to save my last workspace (a large dataset) and every time I open R it loads it back in. Can I stop this? Also how do you clear variables. Thanks, Sachin --- Please consider the environment

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

2010-10-20 Thread Mark Kimpel
Thanks to all for your helpful replies. In my initial email I did mistakenly write "\n" when I had correctly been using "\n" in my code. The key for me seem to be using the approach Bill suggested, i.e., writing to a binary file. If I simply do write.csv(d, "d.text.csv", row.names = FALSE, col.na

[R] histograms resulting from call to soil.texture

2010-10-20 Thread emorway
Hello, Using the dataset below I produce a soil.texture plot (R code for this included at the end). One will notice I have plotted the points based on whether or not they are in a region called 'upstream' or 'downstream'. I'm curious if there is a way to somehow extract counts of the number of

[R] loading workspace- getting annoying

2010-10-20 Thread sachinthaka . abeywardana
I stupidly decided to save my last workspace (a large dataset) and every time I open R it loads it back in. Can I stop this? Also how do you clear variables. Thanks, Sachin --- Please consider the environment before printing this email --- Allianz - General Insurance Company of the Year 2009+ +

Re: [R] efficient test for missing values (NAs)

2010-10-20 Thread Jim Holtman
?complete.cases Sent from my iPhone On Oct 20, 2010, at 18:53, Ali Tofigh wrote: What is the best way to detect whether or not a (potentially large) matrix contains missing values (NAs) or not? I use if (sum(is.na(x)) > 0) {...} are there more efficient ways? /Ali

Re: [R] efficient test for missing values (NAs)

2010-10-20 Thread Phil Spector
Ali - If all you care about is if there are any missing values (not how many or where they are), I think it would be a bit faster to use if(any(is.na(x))){...} - Phil Spector Statistical Computing Facility

[R] efficient test for missing values (NAs)

2010-10-20 Thread Ali Tofigh
What is the best way to detect whether or not a (potentially large) matrix contains missing values (NAs) or not? I use if (sum(is.na(x)) > 0) {...} are there more efficient ways? /Ali __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

[R] Biplot: plot group name instead of row number

2010-10-20 Thread Alejo C.S.
Dear list, I'm trying to make a biplot, but instead of plotting the row number for each observation, plot a group factor. Example: prcomp(iris[,1:4]) -> PCA biplot(PCA) #this makes a nice biplot but with row names Instead of row numbers I want to plot iris[,5], which is a factor. I can do thi

[R] how to connect to a remote PostgreSQL database from R on mac osx

2010-10-20 Thread Simone Gabbriellini
Hello List, I would like to connect to a postgreSQL database on a remote server and I am wondering what is the best package to do that. I have just installed RpgSQL, RPostgreSQL, Rdbi and RODBC. The handiest to me is RPostgreSQL but I don't see how to connect to a remote server with it. For su

Re: [R] rounding up (always)

2010-10-20 Thread Ted Harding
On 20-Oct-10 21:27:46, Duncan Murdoch wrote: > On 20/10/2010 5:16 PM, Dimitri Liakhovitski wrote: >> Hello! >> >> I am trying to round the number always up - i.e., whatever the >> positive number is, I would like it to round it to the closest 10 that >> is higher than this number, the closest 100 t

Re: [R] rounding up (always)

2010-10-20 Thread Clint Bowman
x<-runif(10,1,10) # generate 10 numbers as.integer(log(x,10)+1) -- Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Department of Ecology VOICE: (360) 407-6815 PO Box 47600

Re: [R] rounding up (always)

2010-10-20 Thread Duncan Murdoch
On 20/10/2010 5:16 PM, Dimitri Liakhovitski wrote: Hello! I am trying to round the number always up - i.e., whatever the positive number is, I would like it to round it to the closest 10 that is higher than this number, the closest 100 that is higher than this number, etc. For example: x<-3241.

[R] rounding up (always)

2010-10-20 Thread Dimitri Liakhovitski
Hello! I am trying to round the number always up - i.e., whatever the positive number is, I would like it to round it to the closest 10 that is higher than this number, the closest 100 that is higher than this number, etc. For example: x<-3241.388 signif(x,1) rounds to the closest thousand, i.e.

Re: [R] question about masking

2010-10-20 Thread Paul
On 20/10/10 20:31, Yunting Sun wrote: Hello, I encounter the problem that one library I use masks the function gam in another library I use so that the gam in the other library can't function correctly. Is it possible to damask? I detach one of the library but the masking problem is still

Re: [R] need for speed on grid.rect

2010-10-20 Thread Paul Murrell
Hi On 21/10/2010 9:11 a.m., Mikkel Grum wrote: Hi Paul Thanks ever so much for this. This should help tremendously. My only reason for using semi-transparent colours was not knowing how to use colorRampPalette. I'm really just looking at white-to-somecolour gradients. My examples weren't meant

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-20 Thread Brian Diggs
On 10/20/2010 12:25 PM, Ben Bolker wrote: Sadz A yahoo.co.uk> writes: This works fine untill D=0 because then 'sign' does not give 0 a +ve sign it takes it as 0 and multiplies decimal by 0 to give 0. example D<-0 decimal<-D+(M/60)+(S/3600) decimal.degs<-sign(D)*decimal decimal.degs 0 d

[R] question about masking

2010-10-20 Thread Yunting Sun
Hello, I encounter the problem that one library I use masks the function gam in another library I use so that the gam in the other library can't function correctly. Is it possible to damask? I detach one of the library but the masking problem is still there. Thank you and kind regard

[R] question about masked object

2010-10-20 Thread Yunting Sun
Hello, I encounter the problem that one library I use masks the function gam in another library I use so that the gam in the other library can't function correctly. Is it possible to damask? I detach one of the library but the masking problem is still there. Thank you and kind regard

Re: [R] Multivariate GARCH

2010-10-20 Thread Owe Jessen
Am 20.10.2010 16:51, schrieb 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 HT

Re: [R] need for speed on grid.rect

2010-10-20 Thread Mikkel Grum
Hi Paul Thanks ever so much for this. This should help tremendously. My only reason for using semi-transparent colours was not knowing how to use colorRampPalette. I'm really just looking at white-to-somecolour gradients. My examples weren't meant to be written one on top of the other. Unlike

Re: [R] question about masked object

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 3:42 PM, Yunting Sun wrote: Hello, I encounter the problem that one library I use masks the function gam in another library I use so that the gam in the other library can’t function correctly. Is it possible to damask? I detach one of the library but the masking

[R] bootstrapping nonlinear mixed effects models

2010-10-20 Thread Juliet Ndukum
In order to bootstrap nonlinear regression, the following code works. library(nlme) data(Soybean) fm1.nls <- nls(weight ~ SSlogis(Time, a, b, c), data=Soybean) summary(fm1.nls) bstat <- function(A, indices) { mboot <- nls(weight ~ SSlogis(Time, a, b, c), data=Soybean[indices, ]) return(coef(mb

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 3:19 PM, David Winsemius wrote: On Oct 20, 2010, at 11:47 AM, Sadz A wrote: Hi, I am trying to do some calculations turning DMS data to decimal degrees using the formula (D+(M/60)+(S/3600)), some of the D's involve -ve numbers, the easiest way to do the calculation i

[R] question about masked object

2010-10-20 Thread Yunting Sun
Hello, I encounter the problem that one library I use masks the function gam in another library I use so that the gam in the other library can’t function correctly. Is it possible to damask? I detach one of the library but the masking problem is still there. Thank you and kind regards, g

Re: [R] need for speed on grid.rect

2010-10-20 Thread Paul Murrell
Hi I think the problem is that the Windows graphics device is not great at semitransparent colours. For example, your code runs acceptably fast on my Linux system. If your goal is just a colour gradient, then you could avoid using semitransparency by calculating the colours yourself, for ex

Re: [R] lme with log-normal distribution of parameters

2010-10-20 Thread Ben Bolker
Hoai Thu Thai inserm.fr> writes: > > 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

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-20 Thread Ben Bolker
Sadz A yahoo.co.uk> writes: > > This works fine untill D=0 > because then 'sign' does not give 0 a +ve sign it takes it as 0 and > multiplies > decimal by 0 to give 0. > example > D<-0 > decimal<-D+(M/60)+(S/3600) > decimal.degs<-sign(D)*decimal > decimal.degs > 0 > decimal.degs <- ifelse

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-20 Thread David Winsemius
On Oct 20, 2010, at 11:47 AM, Sadz A wrote: Hi, I am trying to do some calculations turning DMS data to decimal degrees using the formula (D+(M/60)+(S/3600)), some of the D's involve -ve numbers, the easiest way to do the calculation is to use absolute numbers then use the 'sign' functi

Re: [R] S: appropriate significance tests

2010-10-20 Thread soeren . vogel
Thanks Greg for the additional remarks. Basically I have two questions, let me try to specify them as follows: (1) Height and intelligence may correlate at, say, X, but speed and finger length may correlate at Y. Despite any sense of such a statement, is X significantly larger than Y? How can I

Re: [R] Plot creates a straigth line

2010-10-20 Thread Robert Baer
od<-c(10, 8, 6,4,2,1, 10.5,7.8,6.4,3.8,2.1,0.95) cyto_conc=2650 # Highest cytokine concentration user defined cyto_std_conc <-c(cyto_conc) for (i in 1:5) { cyto_conc = cyto_conc /3 cyto_std_conc <-c(cyto_std_conc ,cyto_conc) } cyto_std_conc<-log2(rep(cyto_std_conc,2)) cyto<-cbind(cyto_s

[R] grep

2010-10-20 Thread 1Rnwb
Hi I have a script which is designed to gather data from individual columns from a file, which is an output from an instrument. the file has multiple sections and each a section has data under each column (vars), I am using the name of the column as a variable to gather the column ID using vidx<

Re: [R] Plot creates a straigth line

2010-10-20 Thread jim holtman
'plot' is doing exactly what you are asking it to do. Take a close look at your data: cyto_std_concod [1,] 11.371777 10.00 [2,] 9.786814 8.00 [3,] 8.201852 6.00 [4,] 6.616889 4.00 [5,] 5.031927 2.00 [6,] 3.446964 1.00 [7,] 11.371777 10.50 [8

Re: [R] calculate power of test

2010-10-20 Thread Greg Snow
I generally use simulation to calculate power: library(MASS) out1 <- replicate(1, {tmp <- mvrnorm(100, mu=c(0,0), Sigma=matrix( c(1,.2,.2,1), 2 ) ); cor.test( tmp[,1], tmp[,2] )$p.value } ) mean( out1 <= 0.05 ) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Hea

Re: [R] removing rows from a matrix using condition within groups

2010-10-20 Thread Henrique Dallazuanna
Try this: subset(merge(X, Y, by.x = 'groups', by.y = 1, all = TRUE), values < V2, -V2) On Wed, Oct 20, 2010 at 1:37 PM, swam wrote: > > I am needing some help in removing certain rows in a data.matrix and then > do > some calculation. So Iam need to removing certain values above a threshold >

Re: [R] Function execution on package load?

2010-10-20 Thread Greg Snow
?.First.lib -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Johannes Graumann > Sent: Wednesday, October 20,

Re: [R] S: appropriate significance tests

2010-10-20 Thread Greg Snow
It is not completely clear what question you are trying to answer or what you are trying to accomplish. But here are some additional questions that may help: What tests would you use if you could use the original data? What assumptions are you willing to make about the data and/or statistics? Wh

[R] Plot creates a straigth line

2010-10-20 Thread 1Rnwb
Hello all, I am using 'plot' to create standard curves for elisa data. when I use 'plot' with type='b' i get the points connected with lines and one straigth line from the lowest datapoint to the highest data point. how can i avoid/remove it from the figure. i am using R2.9.1, below is the example

[R] removing rows from a matrix using condition within groups

2010-10-20 Thread swam
I am needing some help in removing certain rows in a data.matrix and then do some calculation. So Iam need to removing certain values above a threshold or value from another vector. For eg.. in the below data matrix X there are 6 groups (A, B, C, D, E ,F) >X rowsgroups values 1 A

[R] Changing sign on absolute numbers 0 problems

2010-10-20 Thread Sadz A
Hi, I am trying to do some calculations turning DMS data to decimal degrees using the formula (D+(M/60)+(S/3600)), some of the D's involve -ve numbers, the easiest way to do the calculation is to use absolute numbers then use the 'sign' function in R to change the answer back to the correct -

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

2010-10-20 Thread Gabor Grothendieck
On Wed, Oct 20, 2010 at 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

[R] Spatstat: tessellation problems.

2010-10-20 Thread Neba Funwi-Gabga
Hello R Users, I am trying to do a quadrat count defined by covariate properties in spatstat. I have read my elevation raster into R (from ascii) and converted to class "im" for use in spatstat. Now I have point data of class "ppp" which window is the same extent as the elevation image. I can conve

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

2010-10-20 Thread William Dunlap
> From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of William Dunlap > Sent: Wednesday, October 20, 2010 10:47 AM > To: Duncan Murdoch; Mark Kimpel > Cc: r-help@r-project.org > Subject: Re: [R] ascii or regex code for alt-enter for Excel > > I think Excel want

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 t

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] 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 "\n"s to "\r\n"s when writing them to a file. ("\n" is not the

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 wrote: > 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 pixe

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" fo

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

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', '/

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

Re: [R] dot plot by group

2010-10-20 Thread Deepayan Sarkar
On Mon, Oct 11, 2010 at 12:55 PM, casperyc 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 lattice (see 'Note'

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

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

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

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 ne

Re: [R] Chron object in time series plot

2010-10-20 Thread Gabor Grothendieck
On Wed, Oct 20, 2010 at 11:08 AM, Manta 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 whether we wish to

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 arch

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

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 wrote: > ?windows > > > On Wed, Oct 20, 2010 at 11:19 AM, Dimitri Liakhovits

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 Acer_p

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] superpose.polygon, panel.polygon and their colors

2010-10-20 Thread Deepayan Sarkar
On Wed, Oct 20, 2010 at 7:53 AM, ottorino 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 upgrade to Lucid I enti

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 state

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 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 CSV data containi

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

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 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: > plot(1:5) > > It opens the R

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

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

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 currently

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 i

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

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

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

  1   2   >