Re: [R] ERROR: missing value where TRUE/FALSE needed

2013-07-16 Thread PIKAL Petr
Hi What is mctp? Why do you think your data are well defined? Did you try str(Datos)? Where you get this error? When you do call mctp or summary? The main problem is that you do not follow posting guide, do not provide reproducible code and/or at least some info about your data. Without that I

Re: [R] how to resolve the install problem in redhat linux

2013-07-16 Thread Prof Brian Ripley
On 17/07/2013 07:02, Jie Tang wrote: I try to install a R resource package (in R.2.15 or R 3.0) There are no such versions of R: see the posting guide. But when I run the command "configure",the Makefile does not generated succefully as error information shown as below --with-readline=yes (

Re: [R] (no subject)

2013-07-16 Thread Jim Lemon
On 07/17/2013 01:41 PM, labib obaid wrote: hi I need to use boxplot for two subsets at the same page Hi labib obaid, Try this: test.df<-data.frame(a=rnorm(80)+4,b=rnorm(80)+4, c=rep(LETTERS[1:4],each=20), d=rep(rep(letters[1:4],each=4),5)) boxplot(test.df$a[test.df$c %in% c("A","B")], test

[R] how to resolve the install problem in redhat linux

2013-07-16 Thread Jie Tang
I try to install a R resource package (in R.2.15 or R 3.0) But when I run the command "configure",the Makefile does not generated succefully as error information shown as below --with-readline=yes (default) and headers/libs are not available my linux sysem is "Red Hat Enterprise Linux Client rel

Re: [R] Masking oceans using polypath

2013-07-16 Thread Paul Murrell
Hi There are a couple of problems: 1. Your 'outline' is much bigger than it needs to be. For example, the following produces just Australia ... outline <- map("worldHires", regions="Australia", exact=TRUE, plot=FALSE) # returns a list of x/y coords 2. The outline you get stil

[R] ERROR: missing value where TRUE/FALSE needed

2013-07-16 Thread Lee Jejen
Hello, I have a problem... I tried using a function and I get the error: "ERROR: missing value where TRUE/FALSE needed" Here is my code: a<-mctp(Ecoli~Fecha, data=Datos, type = "Tukey", alternative = "two.sided", asy.method = "mult.t", plot.simci = TRUE)summary(a) Ecoli, Fecha and Datos are well

[R] (no subject)

2013-07-16 Thread labib obaid
hi I need to use boxplot for two subsets at the same page thank you in advance Sent from Windows Mail [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

Re: [R] writing multiple lines to a file

2013-07-16 Thread arun
HI, May be this helps: printer1<- file("out1.txt","w") write(sprintf("This is line %d.\n",1),printer1,append=TRUE) write("This is line 2",printer1,append=TRUE) close(printer1) #or  printer1<- file("out1.txt","w") writeLines("This is line",con=printer1,sep="\n") writeLines("This is line 2",con=p

[R] interfacing with website

2013-07-16 Thread Daisy Englert Duursma
Hello, I have a question about interfacing with the Atlas of Living Australia website: http://biocache.ala.org.au/#tab_simpleSearch The following code works and I am able to download species observations. The problem I am having is that I would like additional fields of data. If I manually downlo

Re: [R] Announcing TIBCO Enterprise Runtime for R

2013-07-16 Thread Louis Bajuk-Yorgan
Hi Michael Thanks for your questions. Posting them here is fine, or you can also post them on the TERR Community site: https://www.tibcommunity.com/community/products/analytics/terr. Initial answers below--feel free to ask follow ups: > 1. Do you have concrete benchmarks of what sorts of opera

Re: [R] How to remove attributes from scale() in a matrix?

2013-07-16 Thread C W
Thanks, very clear! On Tue, Jul 16, 2013 at 7:08 PM, arun wrote: > Hi Mike, > If you check ?scale > > For ‘scale.default’, the centered, scaled matrix. The numeric > centering and scalings used (if any) are returned as attributes > ‘"scaled:center"’ and ‘"scaled:scale"’ > > By checking

Re: [R] How to remove attributes from scale() in a matrix?

2013-07-16 Thread arun
Hi Mike, If you check ?scale For ‘scale.default’, the centered, scaled matrix.  The numeric centering and scalings used (if any) are returned as attributes ‘"scaled:center"’ and ‘"scaled:scale"’ By checking the source code: methods(scale) getAnywhere('scale.default') function (x, cent

Re: [R] How to remove attributes from scale() in a matrix?

2013-07-16 Thread C W
Arun, thanks for the quick response. That helps. Why does scale() give attributes? What's the point of that? I don't see apply() or any similar functions do it. Just for my curiosity. Mike On Tue, Jul 16, 2013 at 4:07 PM, arun wrote: > HI, > Try: > x1<-scale(x,center=TRUE,scale=TRUE) > str(

Re: [R] Fitting Mixture distributions

2013-07-16 Thread Simon Zehnder
Hi Tjun Kiat Teo, you try to fit a Normal mixture to some data. The Normal mixture is very delicate when it comes to parameter search: If the variance gets closer and closer to zero, the log Likelihood becomes larger and larger for any values of the remaining parameters. Furthermore for the EM

Re: [R] Fitting Mixture distributions

2013-07-16 Thread Rui Barradas
Hello, Try the following. library(sos) findFn('fitting mixture distribution') It found several other packages. Hope this helps, Rui Barradas Em 16-07-2013 21:59, Tjun Kiat Teo escreveu: I was trying to use the normixEM in mixtools and I got this error message. And I got this error messag

[R] Fitting Mixture distributions

2013-07-16 Thread Tjun Kiat Teo
I was trying to use the normixEM in mixtools and I got this error message. And I got this error message One of the variances is going to zero; trying new starting values. Error in normalmixEM(as.matrix(temp[[gc]][, -(f + 1)])) : Too many tries! Are there any other packages for fitting mixture d

Re: [R] Importing data by odbcConnectExcel in 64 bit

2013-07-16 Thread Peter Alspach
Tena koe Perhaps the help file will give you some ideas: "odbcConnectAccess, odbcConnectDbase and odbcConnectExcel are convenience wrappers to generate connection strings for those file types. The files given can be relative to the R working directory or absolute paths (and it seems also relat

Re: [R] How to remove attributes from scale() in a matrix?

2013-07-16 Thread arun
HI, Try: x1<-scale(x,center=TRUE,scale=TRUE) str(x1) # num [1:15, 1:10] -0.2371 -0.5606 -0.8242 1.5985 -0.0164 ... # - attr(*, "scaled:center")= num [1:10] 50.2 50 49.8 49.8 50.3 ...  #- attr(*, "scaled:scale")= num [1:10] 1.109 0.956 0.817 0.746 1.019 ...  attr(x1,"scaled:center")<-NULL  attr(x1,

[R] How to remove attributes from scale() in a matrix?

2013-07-16 Thread C W
Hi list, I am using scale() to standardize a distribution? But why does it give me attributes attached to the data? I just want a standardized matrix, that is all. library(mvtnorm) > x <- rmvnorm(15, mean=rep(50, 10)) > x [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,

Re: [R] pxR

2013-07-16 Thread Rafael Robledo
Hola, creo que la función que buscas es write.px, que te permite guardar un objeto de tipo 'px' a un archivo. Por ejemplo: opx1 <- read.px( system.file( "extdata", "example.px", package = "pxR") ) write.px ( opx1, file = ’opx.px’) # write a copy opx2 <- read.px (’opx.px’) # read the copy con el

Re: [R] Importing data by odbcConnectExcel in 64 bit

2013-07-16 Thread Adams, Jean
Can't help you with the odbcConnectExcel, but I can suggest an alternative ... loadWorkbook() and readWorksheet() in the XLConnect package work on Windows 7 64-bit. library(XLConnect) wb <- loadWorkbook("C:/Temp/Mydata.xlsx") dat <- readWorksheet(wb, sheet="Sheet1") Jean On Tue, Jul 16, 2013 at

[R] Importing data by odbcConnectExcel in 64 bit

2013-07-16 Thread Ahmed Attia
I have probably an old question. I have R.3.0.1 installed in 64 bit windows 7. The odbcConnectExcel in RODBC library does not work. Tried odbcConnectExcel2007 still does not work. Any ideas. Thanks Melissa<-sqlFetch(odbcConnectExcel2007("F:\\Cotton2012\\validation.xlsx"),sqtable = "Sheet3", +

Re: [R] Errors using large numbers ((i) all entries of 'x' must be nonnegative and finite and (ii) NAs introduced by coercion)

2013-07-16 Thread arun
HI, ?as.integer() #documentation Note that current implementations of R use 32-bit integers for integer vectors, so the range of representable integers is restricted to about +/-2*10^9: ‘double’s can hold much larger integers exactly. as.numeric(c(75533, 4756922556, 88210, 67151221

Re: [R] Question on plotting with googleVis

2013-07-16 Thread Greg Snow
The HTKIdentify (requires tcltk package) and HWIdentify (windows only) functions in the TeachingDemos package will show identifying information on a plot for the point being hovered over. Both functions are pure R code, so if they don't work for you as is you can modify the source to make whatever

Re: [R] (1 - 0.7) == 0.3

2013-07-16 Thread arun
HI, 2-0.7==0.3 #[1] FALSE ##May be u meant  2-0.7==1.3 #[1] TRUE Possibly R FAQ 7.31 Also, check http://rwiki.sciviews.org/doku.php?id=misc:r_accuracy all.equal(2-0.7,1.3) #[1] TRUE  all.equal(1-0.7,0.3) #[1] TRUE (1-0.7)<(0.3+.Machine$double.eps^0.5) #[1] TRUE  p <- c(0.2, 0.4, 0.6, 0.8, 1)

[R] pxR

2013-07-16 Thread Belén Cillero
Buenas tardes Una vez que he leído las variables, sexo, edad, estado civil y nacionalidad, ¿cómo genero un px para realizar las distintas consultas?. De momento lo único que he podido hacer con pxR es leer archivos de extensión px pero no sé escribirlos. Muchas gracias

Re: [R] help

2013-07-16 Thread Joshua Ulrich
On Tue, Jul 16, 2013 at 12:23 PM, Dia wrote: > Hi, i am tring to learn R own my own. From where can i download data for R > (creating a subset). Right now i'm using > (http://finance.yahoo.com/q/hp?s=MCD+Historical+Prices) this link for data > but unable to create subset. > > Can someone help me

[R] help

2013-07-16 Thread Dia
Hi, i am tring to learn R own my own. From where can i download data for R (creating a subset). Right now i'm using (http://finance.yahoo.com/q/hp?s=MCD+Historical+Prices) this link for data but unable to create subset. Can someone help me using this data or help me to download different data?

Re: [R] Errors using large numbers ((i) all entries of 'x' must be nonnegative and finite and (ii) NAs introduced by coercion)

2013-07-16 Thread PIKAL Petr
Well, You could find it yourself, as.integer(c(75533, 4756922556, 88210, 6715122129)) [1] 75533NA 88210NA Warning message: NAs introduced by coercion > matrix(c(75533, 4756922556, 88210, 6715122129), nrow=2) [,1] [,2] [1,] 75533 88210 [2,] 4756922556 6715122129

Re: [R] Ode error message

2013-07-16 Thread Berend Hasselman
See inline remarks. On 16-07-2013, at 10:07, Raphaëlle Carraud wrote: > Hello, > > I am creating a program with R to solve a differential equation system. > However, I get the following message I do not understand : > >> out <- ode(y = state, times = z, func = liquide, parms = 0, atol = 0)

Re: [R] Setting Derived Class Slots

2013-07-16 Thread Simon Zehnder
Hi Steve, it seems to me, that you want to pass an object inside of getDelayProfile. In this case you must use setReplaceMethod("getDelayProfile<-",) in your definition inside the virtual and of course also in the specification of OP_Appt. R does not know, that your function should give bac

Re: [R] Setting Derived Class Slots

2013-07-16 Thread Martin Morgan
On 07/16/2013 06:36 AM, Steve Creamer wrote: Dear AllI am really struggling with oo in R. Trying to set attributes of the base class in a derived class method but the slot is only populated in the method itself, not when I try to print out the object from the console. Code is library(RODBC)

Re: [R] glm - change offset to avoid NA?

2013-07-16 Thread David Winsemius
On Jul 16, 2013, at 8:52 AM, Hermann Norpois wrote: > I did not think of something like "try". I thouht that there should always > be a value if I do a logistic regression but sometimes the values are far > from being meaningful. So there is a cut-off. That seems implausilbe. I think you are jus

[R] Errors using large numbers ((i) all entries of 'x' must be nonnegative and finite and (ii) NAs introduced by coercion)

2013-07-16 Thread jgibbons1
Hello, I am fairly new to R, so please forgive me if this is a fairly easy solution. I am trying to perform multiple Fisher's Exact tests or Pearson's Chi-squared contingency tests from a datamatrix in which data from each row is data for an independent test. My data is formatted as such: AAA 75

[R] Setting Derived Class Slots

2013-07-16 Thread Steve Creamer
Dear AllI am really struggling with oo in R. Trying to set attributes of the base class in a derived class method but the slot is only populated in the method itself, not when I try to print out the object from the console. Code is library(RODBC) # #

Re: [R] glm - change offset to avoid NA?

2013-07-16 Thread Hermann Norpois
I did not think of something like "try". I thouht that there should always be a value if I do a logistic regression but sometimes the values are far from being meaningful. So there is a cut-off. My plan was to change the cut-off. Thanks Johannes 2013/7/15 Bert Gunter > I think what you want is

[R] Error from running R2WinBUGS in R

2013-07-16 Thread Anamika Chaudhuri
Hi All: I am getting an error (highlighted) from running R2WinBUGS in R. To be able to replicate the situation heres the code: .#Set working directory setwd("H://AChaudhuri/Testing/CSVS") matrix=NULL csvs <- paste("MVN", 1:2, ".csv", sep="") for(i in 1:length(csvs)){ matrix[[i]] <- read.csv(file=

Re: [R] Serialize data.frame to database

2013-07-16 Thread Simon Zehnder
Hi Rainer, dbWriteTable is a nice function but in my case I need something that can actually save a dataframe in one row of a table. That is why I want to serialize my data.frame. Best Simon On Jul 16, 2013, at 3:05 PM, Rainer Schuermann wrote: > Maybe a simple > > dbWriteTable( db, "f

Re: [R] Weird 'xmlEventParse' encoding issue

2013-07-16 Thread Duncan Temple Lang
Hi Sascha Your code gives the correct results on my machine (OS X), either reading from the file directly or via readLines() and passing the text to xmlEventParse(). The problem might be the version of the XML package or your environment settings. And it is important to report the session info

Re: [R] Serialize data.frame to database

2013-07-16 Thread Rainer Schuermann
Maybe a simple dbWriteTable( db, "frames", iris ) does what you want? On Monday 15 July 2013 23:43:18 Simon Zehnder wrote: > Dear R-Users, > > I need a very fast and reliable database solution so I try to serialize a > data.frame (to binary data) and to store this data to an SQLite database.

[R] Masking oceans using polypath

2013-07-16 Thread Louise Wilson
Hi R-help I am trying to mask the ocean from an image plot I have made. Here is some example code: library(mapdata) image(x=110:155, y =-40:-10, z = outer(1:45, 1:30, "+"), xlab = "lon", ylab = "lat") outline <- map("worldHires", plot=FALSE) # returns a list of x/y coords xrange <- ra

[R] Finding parameters for residuals using GAMLSS and a lognormal dist.

2013-07-16 Thread Chris89
Hi everyone! First of all: I am new to the forum, so please excuse my lack of knowledge on how to post a question... I am working on a project where I need to use the GAMLSS package, and the boss have asked me to try using the lognormal distribution. The regression goes as planned, but when eval

Re: [R] Question on plotting with googleVis

2013-07-16 Thread Arnaud Michel
You can try with list options : plot(gvisBarChart(MyData, xvar="Names1", yvar=c("Values1", "Values2"), options=list(width=1200,height=1500))) Le 15/07/2013 20:00, Christofer Bogaso a écrit : Hello again, Let say I have following data-frame: MyData <- data.frame(Names1 = paste("XXX", 1:150),

Re: [R] MGCV: overlay fitted (marginal) curves over a plot of the original data

2013-07-16 Thread Christoph Scherber
Meanwhile, I found the solution myself: using plot.gam() with shift=intercept and trans=exp (for a poisson model) does the job. I can then add the original data using points() Thanks again for your help, which is greatly appreciated! Best wishes Christoph Am 16/07/2013 11:04, schrieb Simon Woo

Re: [R] MGCV: overlay fitted (marginal) curves over a plot of the original data

2013-07-16 Thread Christoph Scherber
Thanks, the sequence of x0 values was clearly too short. However, is there a way to overlay the (marginal) curve from plot.gam() over a plot of (x,y) values? Best wishes Christoph Am 16/07/2013 11:04, schrieb Simon Wood: > Probably you didn't want to set x0=0:1? Here is some code, to do what

Re: [R] MGCV: overlay fitted (marginal) curves over a plot of the original data

2013-07-16 Thread Simon Wood
Probably you didn't want to set x0=0:1? Here is some code, to do what you want. (The CI shape is not identical to the plot(b) version as the uncertainty includes the uncertainty in the other smooths and the intercept now.) library(mgcv) set.seed(2) dat <- gamSim(1,n=400,dist="normal",scale=2) b

[R] MGCV: overlay fitted (marginal) curves over a plot of the original data

2013-07-16 Thread Christoph Scherber
Dear R users, I´ve stumbled over a problem that can be easily seen from the R code below: - When I use plot.gam() on a fitted model object, I get a nice and well-looking smooth curve for all terms in the model. - However, when I use predict(model) for a given predictor, with values of all othe

[R] Ode error message

2013-07-16 Thread Raphaëlle Carraud
Hello, I am creating a program with R to solve a differential equation system. However, I get the following message I do not understand : > out <- ode(y = state, times = z, func = liquide, parms = 0, atol = 0) DLSODA- EWT(I1) is R1 .le. 0.0 In above message, I1 = 1 In above message, R1 = 0

[R] About Detrended Fluctuation Analysis

2013-07-16 Thread whialy
Hello~ I am just beginner in R program During my research, I should analyze my data using "detrended fluctuation analysis" But it is difficult to find package in R I found the package named "fractal" to calcuate "DFA" but in new version in R, that package does not work any more So...would you tell

Re: [R] Program SPACECAP help

2013-07-16 Thread Jose Jimenez
Please, could you post the the R code and the head of your data? Are you usuing the csv template? Jose -- View this message in context: http://r.789695.n4.nabble.com/Program-SPACECAP-help-tp4670514p4671667.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Problem with plot in several cases, font issue?

2013-07-16 Thread Alice Julien-Laferrière
Thanks for the help. As indicated into the R-admin manual, it was an ubuntu install problem. But it only shows in R, as I do not use special fonts usually. Le 15/07/2013 18:17, Prof Brian Ripley a écrit : On 15/07/2013 15:59, Alice Julien-Laferrière wrote: Dear all, I am having problem o

Re: [R] Serialize data.frame to database

2013-07-16 Thread Simon Zehnder
Hi Jeff, I think you are more right than me. I have not much experience with R-specific objects and Databases. I just know, that for languages like Java, C, etc. this process is a usual one for storing for example matrices (in case of course that I do not have to access specific elements inside