[R] How can I read the "text" or "character string" from a txt file?

2012-05-01 Thread jpm miao
Hello, I have a large number of time series, which needs to be transformed by log or difference. Some of them are just processed by "level" (LV) without any transformation. For that purpose, I produce a text file (.csv or .xls) as follows: DLN DLNDLN LV LV LV... How can I read the

[R] Combined grouped and stacked bargraph

2012-05-01 Thread Nicola Van Wilgen
Dear R-list I am having some trouble drawing a bar-graph with two groups, both of which are stacked. Here are my data in the dput format: cs.not.log.bp <- ( structure(c(168, 69, 16, 69, 41, 6, 148, 6, 5, 4, 7, 4, 4, 2, 7, 2, 4, 2, 4, 2, 1, 0, 2, 0), .Dim = c(4L, 6L), .Dimnames = list(

Re: [R] returning value from source() in R .Net

2012-05-01 Thread Jeff Newmiller
I am mystified as to why you think you can source a snippet of one interpreted language into a different compiled language. Fortunately this is not the correct forum for your question, so I can punt. Google suggests that you look at rdotnet.codeplex.com, and perhaps read their documentation, an

Re: [R] Equivalent of Nothing (in VBA) or [] in Matlab in R

2012-05-01 Thread ruipbarradas
Hello, I'm glad it worked. You could have posted it in r-help, this may be of use to others...   Rui Barradas Citando sb kr : > Hi Rui Barradas, as you guessed the second option worked  >  >Thanks again >  >lm >  >> Date: Sun, 29 Apr 2012 16:52:45 -0700 > > From: ru

[R] returning value from source() in R .Net

2012-05-01 Thread Paul.Rustomji
Hello I would like to source an R script from within a C# .Net application equivalent to: source("my_r_code.r") I can get this to run but am not sure how to retrieve R objects defined with script my_r_code.r at runtime. For example, if "my_r_code.r" contains #-- contents of my_r_code.r---

Re: [R] Numeric data not numeric in .csv file

2012-05-01 Thread Jeff Newmiller
Sounds like you have some text in your csv file. Open it with a text editor and look at it. Some common problems are: alphabetic or symbol characters, spaces, quotes around numbers. Also watch out for blank rows or columns. Read the Posting Guide (mentioned at the bottom of every post). Tips: Th

Re: [R] error bars for a barchart

2012-05-01 Thread ilai
Thank you for your example. I only skimmed it, but since both solutions use nlevels and box.ratio it is no surprise we end up at the same place (although I do think your g-median is nicer than my 3/4). Thing is, I wouldn't call either of these "simple"... would be nice if one could just query the

[R] MCMCglmm priors including phylogeny

2012-05-01 Thread Stott, Iain
Hi all, I'm hoping I might be able to get some help with some issues specifying priors for MCMCglmm. I'm trying to fit a gaussian glmm using MCMCglmm to a data set with two (correlated) response variables. The response variables are both logit-transformed proportions (there are a few reasons

[R] Numeric data not numeric in .csv file

2012-05-01 Thread Eve Proper
I am a raw novice to R, playing around with a mini .csv dataset created in Excel. I can read it in and the data looks OK in Excel and upon initial inspection in R: hikes <- read.csv("/Users/eproper/Desktop/hikes.csv", header=TRUE) print(hikes) does exactly what it is supposed to do. Two of the v

[R] Robust estimation of a geometric random variable

2012-05-01 Thread List User
Hi, I have a bunch of data which is assumed to be instances of a geometric random variable with outliers. How can I do a robust estimation of the parameter p so that the effect of outliers is minimized? As a part of the estimation process, I also need to know which are the outliers in the data.

[R] coxph reference hazard rate

2012-05-01 Thread Georges Dupret
Hi, In the following results I interpret exp(coef) as the factor that multiplies the base hazard rate if the corresponding variable is TRUE. For example, when the bucket is ks008 and fidelity <= 3, then the rate, compared to the base rate h_0(t), is h(t) = 0.200 h_0(t). My question is then, to wha

[R] please help me

2012-05-01 Thread Ulfa Hasanah
hi all,can you help me? index moran is very difficut for me, i have data n neighbor as enclosure: please help me to make the program for find index moran value each variabel,...thank very much __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

Re: [R] VarCorr procedure from lme4

2012-05-01 Thread David Stevens
That was it - detaching 'nlme' was the trick. Thanks Walmes and the rest. David On 5/1/2012 7:47 PM, David Stevens wrote: > Yes - I also have nlme. Bad juju? > > David > > On 5/1/2012 1:32 PM, Walmes Zeviani wrote: >> It could be a bad coexistence between packages in the same R session. Are >> y

Re: [R] VarCorr procedure from lme4

2012-05-01 Thread David Stevens
Yes - I also have nlme. Bad juju? David On 5/1/2012 1:32 PM, Walmes Zeviani wrote: > It could be a bad coexistence between packages in the same R session. Are > you using nlme and/or doBy packages too? > > Bests. > Walmes. > > =

Re: [R] Define lower-upper bound for parameters in Optim using Nelder-Mead method

2012-05-01 Thread Ben Bolker
wlandres.net> writes: > > On 01-May-2012 19:58:41 Arnaud Mosnier wrote: > > Dear UseRs, > > > > Is there a way to define the lower-upper bounds for parameters > > fitted by optim using the Nelder-Mead method ? > > > > Thanks, > > Arnaud > > The Nelder-Mead method does not provide built-in ca

Re: [R] How to Export an R outcome to an Excel Spreadshee​t

2012-05-01 Thread R. Michael Weylandt
? write.csv Michael On May 1, 2012, at 4:52 PM, PaulJr wrote: > Hello R community, > > > > I basically created a normal distribution with mean 2500 and standard > deviation = 450 with a sample of size 50 and assigned that to a variable > named genvar2 with the following command: > > > > g

Re: [R] Forecast Package for 2.15.0

2012-05-01 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of slipkid90515 > Sent: Tuesday, May 01, 2012 2:41 PM > To: r-help@r-project.org > Subject: Re: [R] Forecast Package for 2.15.0 > > After poking around a little bit, I was able to i

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

2012-05-01 Thread Aaditya Nanduri
Im sorry. I meant cor.test() On Tue, May 1, 2012 at 6:16 PM, Aaditya Nanduri wrote: > Awesome! cor.text() is what I was looking for! Thank you Duncan! > > > On Wed, Apr 25, 2012 at 9:43 AM, Duncan Murdoch > wrote: > >> On 12-04-25 9:30 AM, Aaditya Nanduri wrote: >> >>> Hey everyone, >>> >>> >>>

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

2012-05-01 Thread Aaditya Nanduri
Awesome! cor.text() is what I was looking for! Thank you Duncan! On Wed, Apr 25, 2012 at 9:43 AM, Duncan Murdoch wrote: > On 12-04-25 9:30 AM, Aaditya Nanduri wrote: > >> Hey everyone, >> >> >> I hope this finds you in good cheer. >> >> I just have a quick question: What is the function that outp

Re: [R] Forecast Package for 2.15.0

2012-05-01 Thread slipkid90515
After poking around a little bit, I was able to install the package using the "Install packages from local zip(s) files" command from the Packages menu. I had to go grab the zip file from "http://cran.stat.sfu.ca/bin/windows/contrib/2.15/"; because it looked like R was going to a nonexistent URL w

[R] How to Export an R outcome to an Excel Spreadshee​t

2012-05-01 Thread PaulJr
Hello R community, I basically created a normal distribution with mean 2500 and standard deviation = 450 with a sample of size 50 and assigned that to a variable named genvar2 with the following command: genvar2<-rnorm(mean=2500, sd=450, n=50) Now, the output of genvar2 generates de fol

Re: [R] Define lower-upper bound for parameters in Optim using Nelder-Mead method

2012-05-01 Thread Ted Harding
On 01-May-2012 19:58:41 Arnaud Mosnier wrote: > Dear UseRs, > > Is there a way to define the lower-upper bounds for parameters > fitted by optim using the Nelder-Mead method ? > > Thanks, > Arnaud The Nelder-Mead method does not provide built-in capability to set bounds on the range of paramater

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread David Winsemius
On May 1, 2012, at 1:33 PM, Bert Gunter wrote: AdvisoRs: Is the following a bug, feature, hinky error message, or dumb Bert? mtest <- matrix(1:12,nr=4) dftest <- data.frame(mtest) ix <- cbind(1:2,2:3) mtest[ix] <- NA mtest [,1] [,2] [,3] [1,]1 NA9 [2,]26 NA [3,]3

Re: [R] Forecast Package for 2.15.0

2012-05-01 Thread R. Michael Weylandt
No What have you tried? OS? R build? Install method? Error messages? Note this has some C++ dependencies so it might be a little tricky to compile if you are missing necessary tools. Michael On May 1, 2012, at 2:05 PM, slipkid90515 wrote: > Anyone else having problems installing this pa

Re: [R] How to Export an R outcome to an Excel Spreadsheet

2012-05-01 Thread Roy Mendelssohn
?write.table Googling it would find the same thing -Roy On May 1, 2012, at 1:41 PM, Paul Bernal wrote: > Hello R community, > > I basically created a normal distribution with mean 2500 and standard > deviation = 450 with a sample of size 50 and assigned that to a variable > named genvar2 with

[R] How to Export an R outcome to an Excel Spreadsheet

2012-05-01 Thread Paul Bernal
Hello R community, I basically created a normal distribution with mean 2500 and standard deviation = 450 with a sample of size 50 and assigned that to a variable named genvar2 with the following command: genvar2<-rnorm(mean=2500, sd=450, n=50) Now, the output of genvar2 generates de following:

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Rui Barradas
Hello, Bert Gunter wrote > > Duncan: > > Maybe there **is** a bug, then. > > > zmat <- matrix(1:12,nr=4) >> zdf <- data.frame(zmat) >> ix <- cbind(c(FALSE,TRUE),c(TRUE,TRUE)) >> zmat[ix] > [1] 2 3 4 6 7 8 10 11 12 >> zdf[ix] > [1] 2 3 4 6 7 8 10 11 12 >> zmat[ix] <- NA >> zmat >

[R] Fitting a first order compartment model in nlme

2012-05-01 Thread Ranae
Hello, I am using SSfol in nlme to fit some data for the change of N concentration (N) in plant tissue over time (gdd). The model works nicely for 2 out of 3 treatments, so I would really like to use it, but it consistently has a bad fit for my third treatment. I am pasting the figure for the th

[R] Hypothesis Testing using Wald Criterion for two regression models with dummy variables

2012-05-01 Thread meredith
I have two models, controlled by dummy variables to see if the models can be combined into one model with similar intercepts and slopes. Has anyone tried to conduct this type of test in R. I am utilizing the econometric idea of hypothesis testing through the hypothesis of coincidence. I have tried

[R] Problems accessing environment() in function

2012-05-01 Thread Heiko Neuhaus
Hi all, I am trying to create a list of all variable/value combinations in environment(). When a function with unset arguments is called, the method I have been using fails with a "missing argument" error. However it should be possible to simply skip these missing objects in the generation o

[R] Plotting shapefiles on existing maps

2012-05-01 Thread Brandon Boyd
Very helpful. One (possible) correction inline below... On Thu, 30 Mar 2006, Ray Brownrigg wrote: > > From: nhy303 at abdn.ac.uk > > > > I have plotted a map of the Barents Sea and surrounding coastline using: > > > > map('worldHires',ylim=c(50,85),xlim=c(5,65),fill=T,resolution=0) > > map.axes()

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Rui Barradas
P.S. The way the logical matrix is constructed is NOT general purpose. Quoting myself quoting Bert, > > Actually, it works, as long as the logical index matrix has the same > dimensions as the data frame. > > zmat <- matrix(1:12,nr=4) > zdf <- data.frame(zmat) > > # Numeric index matrix. > ix <-

[R] Forecast Package for 2.15.0

2012-05-01 Thread slipkid90515
Anyone else having problems installing this package? Any ideas for fixing? Thanks, Jess -- View this message in context: http://r.789695.n4.nabble.com/Forecast-Package-for-2-15-0-tp4601328.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Arules and different item columns with same item labelsŠ.

2012-05-01 Thread Levent TERLEMEZ
Dear Users, I have data that have different data columns (hair color, eye color, etc. ) with same item labels and I do not want to recode them like haircolor=brown, etc. Is it possible to do it automatically? Thanks right now for your tips and given directions. -- Levent TERLEMEZ [[al

Re: [R] [fields:image.plot] subtitle under title (not image)?

2012-05-01 Thread Doug Nychka
Tom, The sub argument will always put text at the bottom -- this is all plotting in R not just image.plot If you want two lines in the title just build in a new line: z<- outer( 1:15, 1:10,"+") image.plot( z, main="the title \n the subtitle") Best, Doug

Re: [R] 95% confidence interval of the coefficients from a bootstrap analysis

2012-05-01 Thread baconbeach
Hi Rui, You are awesome!!! It worked perfectly!! Thanks -- View this message in context: http://r.789695.n4.nabble.com/95-confidence-interval-of-the-coefficients-from-a-bootstrap-analysis-tp4599692p4601296.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Duncan Murdoch
On 12-05-01 3:57 PM, Nordlund, Dan (DSHS/RDA) wrote: Bert, I think this is what is needed for the data frame ix<- cbind(1:2,2:3) ixm<- matrix(FALSE,4,3) ixm[ix]<- TRUE zdf[ixm]<- NA Hope this is helpful, That's essentially what I did in adding the numeric indexing. The only complication wa

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Bert Gunter
Many thanks to all. I appreciate your kindness and patience. The point is, of course, that matrix subscripting by logicals requires different semantics than by numeric indices, as it must. I'd still say this is a case of option 4, dumb Bert: I should have figured this out. Duncan's proposed chang

Re: [R] Define lower-upper bound for parameters in Optim using Nelder-Mead method

2012-05-01 Thread Thomas Lumley
On Wed, May 2, 2012 at 7:58 AM, Arnaud Mosnier wrote: > Dear UseRs, > > Is there a way to define the lower-upper bounds for parameters fitted by > optim using the Nelder-Mead method ? > It depends a bit on whether it's plausible that the solution is on the boundary. If not, simply returning Inf

[R] Define lower-upper bound for parameters in Optim using Nelder-Mead method

2012-05-01 Thread Arnaud Mosnier
Dear UseRs, Is there a way to define the lower-upper bounds for parameters fitted by optim using the Nelder-Mead method ? Thanks, Arnaud [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Nordlund, Dan (DSHS/RDA)
Bert, I think this is what is needed for the data frame ix <- cbind(1:2,2:3) ixm <- matrix(FALSE,4,3) ixm[ix] <- TRUE zdf[ixm] <- NA Hope this is helpful, Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Dat

Re: [R] error bars for a barchart

2012-05-01 Thread Walmes Zeviani
I have a repoducibe example here http://ridiculas.wordpress.com/2011/11/23/media-e-desvio-padrao-de-muitas-variaveis-separado-por-grupos/ Sorry for it be in Portuguese. Walmes. == Walmes Marques Zeviani LEG (Laboratório de

Re: [R] VarCorr procedure from lme4

2012-05-01 Thread Walmes Zeviani
It could be a bad coexistence between packages in the same R session. Are you using nlme and/or doBy packages too? Bests. Walmes. == Walmes Marques Zeviani LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.2317

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Duncan Murdoch
On 01/05/2012 2:45 PM, Bert Gunter wrote: Duncan: Maybe there **is** a bug, then. > zmat<- matrix(1:12,nr=4) > zdf<- data.frame(zmat) > ix<- cbind(c(FALSE,TRUE),c(TRUE,TRUE)) > zmat[ix] [1] 2 3 4 6 7 8 10 11 12 > zdf[ix] [1] 2 3 4 6 7 8 10 11 12 > zmat[ix]<- NA > zmat

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread David L Carlson
The difference is in recycling. If the logical matrix has the same dimensions, it seems to work: > jx <- cbind(c(FALSE, TRUE, FALSE, TRUE), c(TRUE, FALSE, TRUE, FALSE), c(FALSE, TRUE, FALSE, TRUE)) > zmat[jx] <- NA > zmat [,1] [,2] [,3] [1,]1 NA9 [2,] NA6 NA [3,]3 NA

Re: [R] VarCorr procedure from lme4

2012-05-01 Thread Doran, Harold
Can you give sessionInfo()? It is working fine for me. > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of David Stevens > Sent: Tuesday, May 01, 2012 2:38 PM > To: r-help@r-project.org > Subject: [R] VarCorr procedure from lme4 >

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Bert Gunter
Duncan: Maybe there **is** a bug, then. > zmat <- matrix(1:12,nr=4) > zdf <- data.frame(zmat) > ix <- cbind(c(FALSE,TRUE),c(TRUE,TRUE)) > zmat[ix] [1] 2 3 4 6 7 8 10 11 12 > zdf[ix] [1] 2 3 4 6 7 8 10 11 12 > zmat[ix] <- NA > zmat [,1] [,2] [,3] [1,]159 [2,] NA N

[R] VarCorr procedure from lme4

2012-05-01 Thread David Stevens
Folks In trying to use lmer for a hierarchical model, I encountered the following message: Error in UseMethod("VarCorr") : no applicable method for 'VarCorr' applied to an object of class "mer" foo.mer <- lmer(y ~ TP + (TP|M),data=joe.q) > head(joe.q[,1:5]) TP M AB Trty 1 1

Re: [R] rbind-ing numeric matrices

2012-05-01 Thread Sarah Goslee
On Tue, May 1, 2012 at 2:12 PM, Nick Switanek wrote: > Thank you, Sarah! > > Yes, unlist() looks like it will do just what I need. Thank you. > > I took a different tack. I'd changed the function returning A to coerce the > row from the data.frame using as.numeric(). Any reason to prefer your way

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Duncan Murdoch
On 01/05/2012 2:12 PM, Bert Gunter wrote: Many thanks, Ista: I only looked in "].default" so the answer is: Alternative 4: dumb Bert. Rap knuckles with ruler. Actually, indexing by a logical matrix doesn't make much sense to me in either case, as it does not have the effect of selecting indivi

Re: [R] rbind-ing numeric matrices

2012-05-01 Thread Nick Switanek
Thank you, Sarah! Yes, unlist() looks like it will do just what I need. Thank you. I took a different tack. I'd changed the function returning A to coerce the row from the data.frame using as.numeric(). Any reason to prefer your way or mine? thanks again, Nick On Tue, May 1, 2012 at 2:08 PM, S

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Bert Gunter
Many thanks, Ista: I only looked in "].default" so the answer is: Alternative 4: dumb Bert. Rap knuckles with ruler. Actually, indexing by a logical matrix doesn't make much sense to me in either case, as it does not have the effect of selecting individual elements, which is what numeric matrix

Re: [R] rbind-ing numeric matrices

2012-05-01 Thread Sarah Goslee
Hi Nick, On Tue, May 1, 2012 at 1:56 PM, Nick Switanek wrote: > Thank you, Steve and Sarah, for your swift replies. > > I didn't know about dput(). class() returns "matrix" for A, B, and C, but > here: > >> class(A) > [1] "matrix" >> class(B) > [1] "matrix" >> dput(A) > structure(list(1239814462,

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Ted Harding
On 01-May-2012 17:33:23 Bert Gunter wrote: > AdvisoRs: > > Is the following a bug, feature, hinky error message, or dumb Bert? > > mtest <- matrix(1:12,nr=4) > dftest <- data.frame(mtest) > ix <- cbind(1:2,2:3) > mtest[ix] <- NA > mtest > [,1] [,2] [,3] > [1,]1 NA9 > [2,]

Re: [R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Ista Zahn
Hi Bert, The failure itself is the documented behavior: ?'[.data.frame' says "Matrix indexing ('x[i]' with a logical or a 2-column integer matrix 'i') using '[' is not recommended, and barely supported. For extraction, 'x' is first coerced to a matrix. For replacement, a logical m

Re: [R] rbind-ing numeric matrices

2012-05-01 Thread Nick Switanek
Thank you, Steve and Sarah, for your swift replies. I didn't know about dput(). class() returns "matrix" for A, B, and C, but here: > class(A) [1] "matrix" > class(B) [1] "matrix" > dput(A) structure(list(1239814462, 1239814601, 14349, 3, 4, 0, 12, 46601, 17801, 12401, 106001), .Dim = c(1L, 1

[R] Data frame vs matrix quirk: Hinky error message?

2012-05-01 Thread Bert Gunter
AdvisoRs: Is the following a bug, feature, hinky error message, or dumb Bert? > mtest <- matrix(1:12,nr=4) > dftest <- data.frame(mtest) > ix <- cbind(1:2,2:3) > mtest[ix] <- NA > mtest [,1] [,2] [,3] [1,]1 NA9 [2,]26 NA [3,]37 11 [4,]48 12 ## But ...

Re: [R] error bars for a barchart

2012-05-01 Thread ilai
Hi, I think the issue is not "respecting the groups" but finding the x-location of the center of bars in panel.barchart(groups,...). Don't know about the memisc package, but doesn't look like it provides an easy solution. This is how I do it: http://www.mail-archive.com/r-help@r-project.org/msg1622

[R] [fields:image.plot] subtitle under title (not image)?

2012-05-01 Thread Tom Roche
summary: how to make image.plot print a subtitle between the title and the image, rather than under the image? details: I've got a project https://github.com/TomRoche/ioapi-hack-R that illustrates the use of (et al) the R packages {ncdf4, fields, M3} for processing and visualizing IOAPI data.

Re: [R] rbind-ing numeric matrices

2012-05-01 Thread Steve Lianoglou
Hi, On Tue, May 1, 2012 at 11:52 AM, Nick Switanek wrote: > Good morning, > > I'm running into trouble rbind-ing numeric matrices with differing numbers > of rows. In particular, there seem to be issues whenever a one-row numeric > matrix is involved. > > Assume A is a numeric matrix with 1 row a

Re: [R] rbind-ing numeric matrices

2012-05-01 Thread Sarah Goslee
Hi Nick, We absolutely need a reproducible example, with code and data, to be able to help you. Because otherwise I can't replicate your problem: > A <- matrix(1:5, nrow=1, ncol=5) > B <- matrix(6:20, nrow=3, ncol=5) > C <- rbind(A, B) > A [,1] [,2] [,3] [,4] [,5] [1,]1234

[R] rbind-ing numeric matrices

2012-05-01 Thread Nick Switanek
Good morning, I'm running into trouble rbind-ing numeric matrices with differing numbers of rows. In particular, there seem to be issues whenever a one-row numeric matrix is involved. Assume A is a numeric matrix with 1 row and Y columns and B is a numeric matrix with X rows and Y columns. Let C

Re: [R] Regression

2012-05-01 Thread Saint
Thank u! -- View this message in context: http://r.789695.n4.nabble.com/Regression-tp4598984p4600776.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] error bars for a barchart

2012-05-01 Thread Beatriz De Francisco
Hi I have the following barchart to which I want to add error bars. library(lattice) barchart(Change~fTreat,groups=Process,change, auto.key=list(points=FALSE,rectangles=TRUE), panel=function(x, y,...){ panel.barchart(x,y,origin = 0,...);

Re: [R] 95% confidence interval of the coefficients from a bootstrap analysis

2012-05-01 Thread Rui Barradas
Hello, baconbeach wrote > > Thanks again for your swift response!! > > With your last line, I get > >> rowMeans(sapply(stor.confint, colMeans)) > 2.5 %97.5 % > 0.3256882 0.4604677 > > I need the values (2.5% and 97.5%) for each variable of my model. I don't > think this what I am

[R] error bars for a barchart

2012-05-01 Thread Beatriz De Francisco
Hi I have the following barchart to which I want to add error bars. library(lattice) barchart(Change~fTreat,groups=Process,change, auto.key=list(points=FALSE,rectangles=TRUE), panel=function(x, y,...){ panel.barchart(x,y,origin = 0,...);

Re: [R] Usage line in .pdf version of manual is truncated

2012-05-01 Thread Yihui Xie
There is actually another approach which can do the job automatically; see the function reformat_code() in R2roxygen (remember to back up your Rd files before you use it). If you document your package with roxygen2, things can be even easier -- just call the function rab() to roxygenize and reform

Re: [R] Question about expand.grid function in R

2012-05-01 Thread peter dalgaard
On May 1, 2012, at 15:36 , R. Michael Weylandt wrote: > I don't think you can do it within expand.grid() but something like > this might work: > > rownames(x) <- apply(x, 1, paste, collapse = "") > Also rownames(x) <- do.call(paste, c(x, sep="")) or, in recent versions, rownames(x) <- do.ca

Re: [R] question on jitter in plot.Predict in rms

2012-05-01 Thread Frank Harrell
Mike, Try plot(pref, ..., scat1d.opts=list(frac=0.025, lwd=0.3, nhistSpike=i)) where i = 1 to always use spike histograms (default is to use them if n >= 2000) or i=1e7 to never use them and to always jitter instead. There are many other scat1d options you can pass through scat1d.opts. Frank

Re: [R] Optim (fct): Parameters=LowerBounds

2012-05-01 Thread John C Nash
There's no reason that the optimum cannot be at the bounds. Bounded problems really do sometimes have solutions on those bounds. Compute the unconstrained gradient of your objective function at the bounds and see if the function is reduced when going across the bounds. The function here is assum

Re: [R] Question about expand.grid function in R

2012-05-01 Thread R. Michael Weylandt
I don't think you can do it within expand.grid() but something like this might work: rownames(x) <- apply(x, 1, paste, collapse = "") Michael On Tue, May 1, 2012 at 5:05 AM, Kelly Cool wrote: > Hi, > > I am extremely new to R, and was wondering if someone would be able to help > me with a ques

Re: [R] Area between 2 curves

2012-05-01 Thread sappy
Yes, i have install the Package Bolstad. And it works (sintegral). -- View this message in context: http://r.789695.n4.nabble.com/Area-between-2-curves-tp4597813p4600629.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project

[R] Question about expand.grid function in R

2012-05-01 Thread Kelly Cool
Hi, I am extremely new to R, and was wondering if someone would be able to help me with a question regarding the expand.grid function. When I input expand.grid.rep <- function(x, n=1) do.call(expand.grid, rep(list(x),n)) expand.grid.rep(c("a", "b", "c"), 3) my output is as follows, Var1 Var2 V

Re: [R] Why does the order of terms in a formula translate into different models/ model matrices?

2012-05-01 Thread peter dalgaard
I know this is three months old, but I had put it on a mental TODO list to see whether it was something that could be fixed, and I finally got a little spare time for that sort of thing. It turns out that it can NOT be fixed (without fundamental design changes), so I thought I'd better record th

Re: [R] Different varable lengths

2012-05-01 Thread John Kane
> -Original Message- > From: sarah.gos...@gmail.com > Sent: Mon, 30 Apr 2012 17:06:19 -0400 > To: jrkrid...@inbox.com > Subject: Re: [R] Different varable lengths > > Because of the missing comma. I knew I needed new glasses ! > > On Mon, Apr 30, 2012 at 4:56 PM, John Kane wrote: >>>

Re: [R] Clustering analysis with ordination plots

2012-05-01 Thread Uwe Ligges
On 30.04.2012 18:44, borinot wrote: Hello to all, I'm new to R so I have a lot of problems with it, but I'll only ask the main one. I have clustered an environmental matrix We do not know what that is. Where is the example data? See the posting guide. with 2 different methods, Which

Re: [R] Subtract days to dates in POSIXct format

2012-05-01 Thread Santiago Guallar
Yes, sorting longitude and latitude correctly solves the problem! However, this only works near the Canaries. When selecting the January data (probable location: South African waters) sunrise time (but not sunset time) for the given coordinates is about 4 hours later than the local sunrise. Sys

Re: [R] compiling an R script

2012-05-01 Thread mlell08
On 01.05.2012 00:12, strycker wrote: > I'm interested in this question, too, not so I can hide code, but so I can > run R code faster. It's been my experience that compiled code always runs > faster than interpreted code. Can you explain further how to compile a > front-end? > > -- > View this me

Re: [R] Questions

2012-05-01 Thread peter dalgaard
On May 1, 2012, at 06:47 , Jeff Newmiller wrote: > This is not the RStudio support forum. I use it, I like it, but you need to > learn the difference between R and RStudio. > > In this case, the fact that you are using RStudio is probably irrelevant. > What is more relevant is that you are not

Re: [R] Regression

2012-05-01 Thread peter dalgaard
On Apr 30, 2012, at 20:27 , Saint wrote: > Trying to do a regression for four variables. I get information only for two. > The rest is marked "NA". Why? And what does NA mean? Your design matrix is singular since p is constant and p+Sweden.infl.dev=Sweden.infl, so two coefficients are set to m

Re: [R] index moran

2012-05-01 Thread peter dalgaard
On May 1, 2012, at 09:06 , Ulfa Hasanah wrote: > what is "nb2listw" in index moran? Did you try help(nb2listw) ? -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda..

[R] Re : index moran

2012-05-01 Thread Pascal Oettli
? nb2listw - Mail original - De : Ulfa Hasanah À : "r-h...@stat.math.ethz.ch" Cc : "r-h...@stat.math.ethz.ch" Envoyé le : Mardi 1 mai 2012 16h06 Objet : [R] index moran what is "nb2listw" in index moran?     [[alternative HTML version deleted]]

[R] index moran

2012-05-01 Thread Ulfa Hasanah
what is "nb2listw" in index moran? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide c

[R] testing parallel slopes assumption for Ordinal Logistic Regression

2012-05-01 Thread 80past2
Hi everyone, I'm a bit new here (and new to R), and I was trying to do an OLR, and testing the parallel slope assumption seems be very important. I browsed through past postings, and didn't find much to help me in this area. I was wondering if anyone knew how I could go about doing this. Thank you.