Re: [R] Scatter plots using pairs()

2014-02-11 Thread Nestor Arguea
Thanks David (and A.K. arun). I did have the function panel.cor() defined previously in the Mac but not in the windoze. Mac is the main machine. Thanks again, N.A. -- Nestor M. Arguea, Chair Department of Marketing and Economics University of West Florida David Winsemius

[R] r hepl

2014-02-11 Thread Amaleswara Rao
Hi guye's if u don't mind solve this problem please Data<-data.frame(Age=sample(10:75,50),Income=sample(6000:5,50),Profit=sa mple(2000:4,50),stringsAsFactors=F) uniq1<-unique(quantile(Data[[1]],seq(0,1,0.01))) Interval_age<-findInterval(Data[[1]],uniq1) bins_age<-cut(Data$Age,s

Re: [R] setting yaxis in logscale

2014-02-11 Thread Duncan Mackay
see ? plotmath ?bquote Regards Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home: mac...@northnet.com.au -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of juliana A

Re: [R] setting yaxis in logscale

2014-02-11 Thread Duncan Mackay
I have not received my OP email yet or the gremlins of filters have stepped in I had a quick look at the site but did not find anything It is a case of modifying the scales argument dput(xy) structure(list(x = c(1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L), y = c(1L, 2L, 3L, 4L,

Re: [R] need for help!

2014-02-11 Thread PIKAL Petr
Hi have you hard about Google? I tried enter into it causality test time series in r and got plenty of answers some of them related to R. http://www.r-bloggers.com/granger-causality-testing-in-r/ Isn't it what you want? Regards Petr > -Original Message- > From: r-help-boun...@r-proje

Re: [R] help

2014-02-11 Thread PIKAL Petr
OK, again. What was wrong with my previous response? ?cut ?factor And if you are in reading those two help pages, you could possibly also to glimpse to R-intro. Regards Petr PS. do not post in HTML, your post will get scrammbled. > -Original Message- > From: r-help-boun...@r-project.o

Re: [R] select groups

2014-02-11 Thread arun
Hi, Try: row.names(res) <- gsub(".*\\.","",row.names(res))  row.names(res)[1:2] #[1] "23" "2" A.K. Thank you very much. But it's possible have the inicial number of the row without a.23, but only 23, for example? It's important to know which row I had select. Thank you very much for yo

Re: [R] Form groups of lines and select specific values

2014-02-11 Thread arun
Hi, Not sure I understand it correctly. May be this helps: dat <- read.table(text="type1  chrx startx  endx  chry   starty  endy type2 gain_765   chr15 9681969   9685418  chr15    9660912    9712719     loss_1136 gain_766   chr15   

Re: [R] svyglm error message

2014-02-11 Thread Jeff Newmiller
This is probably a case of incorrect import format conversion... You may be looking at the visual representation of the data within R but not the structure of the data within R. Use the str function to find out more about your data as R understands it... if you actually have empty strings mixed

Re: [R] Scatter plots using pairs()

2014-02-11 Thread arun
Did you run the panel.cor? pairs(z,upper.panel=panel.cor) Error in pairs.default(z, upper.panel = panel.cor) :   object 'panel.cor' not found panel.cor <- function(x, y, digits = 2, prefix = "", cex.cor, ...)   {   usr <- par("usr"); on.exit(par(usr))   par(usr = c(0, 1, 0, 1

Re: [R] Scatter plots using pairs()

2014-02-11 Thread David Winsemius
On Feb 11, 2014, at 12:54 PM, Nestor Arguea wrote: > Command pairs() does not show the correlation coefficient on the upper > diagonal of a set of scatter plots. The command produces an error in > Windows 7, but it works fine in OS X Mavericks with the same R version > 3.0.2. Platform, R versio

Re: [R] setting yaxis in logscale

2014-02-11 Thread David Winsemius
On Feb 11, 2014, at 12:26 PM, juliana Arruda de Matos wrote: > Hi all, > > > > I´ve been trying hard to set up the yaxis in log scale as the Figure 3 in the > article below, but I couldn´t find out how to do it. Could anybody help me? > > > > http://www.plosone.org/article/info%3Adoi%2F10.

[R] Scatter plots using pairs()

2014-02-11 Thread Nestor Arguea
Command pairs() does not show the correlation coefficient on the upper diagonal of a set of scatter plots. The command produces an error in Windows 7, but it works fine in OS X Mavericks with the same R version 3.0.2. Platform, R version and example under Windows 7 provided below. $platform [1] "

Re: [R] setting yaxis in logscale

2014-02-11 Thread juliana Arruda de Matos
By the way, I can´t write 10 to the 6th power in my axis title either. I want it to be like in the Figure 3 of the article below, but I only can get "SFC/10^6 PBMC etc"... Sorry for the silly questions... From: j_arruda_ma...@hotmail.com To: r-help@r-project.org Subject: [R] setting ya

[R] setting yaxis in logscale

2014-02-11 Thread juliana Arruda de Matos
Hi all, I´ve been trying hard to set up the yaxis in log scale as the Figure 3 in the article below, but I couldn´t find out how to do it. Could anybody help me? http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0041936 Thanks, Juliana >

[R] Problem plotting RDA Results

2014-02-11 Thread Marban, Paul
Good afternoon, I am trying to plot my RDA results but have come across a barrier. I am using the vegan package for my RDA . My plot that results some a simple >plot(myrda1) shows the correct variables (landscape type and species code) but there is a clump of species codes at the origin that I do

Re: [R] Conditional formatting of POSIXct date axis labels to only print year at a change

2014-02-11 Thread Duncan Murdoch
On 14-02-11 6:13 PM, Peter Lomas wrote: Hello, I'm creating graphs like the following: x <- seq(as.POSIXct("2012-01-01"), as.POSIXct("2013-01-01"), by = "days") y <- (1:length(x)*10 + cumsum(rnorm(n=length(x), mean=0, sd= 100))) plot(x,y, type = 'l', xaxt='n') axis.POSIXct(side=1,at=seq(min(x),

[R] Conditional formatting of POSIXct date axis labels to only print year at a change

2014-02-11 Thread Peter Lomas
Hello, I'm creating graphs like the following: x <- seq(as.POSIXct("2012-01-01"), as.POSIXct("2013-01-01"), by = "days") y <- (1:length(x)*10 + cumsum(rnorm(n=length(x), mean=0, sd= 100))) plot(x,y, type = 'l', xaxt='n') axis.POSIXct(side=1,at=seq(min(x), max(x), by="months"), format = "%b \'%y

Re: [R] installing from source on a new Windows machine

2014-02-11 Thread Erin Hodgess
Sort of solved:when I change back to 32 bit in the MkRules.local file, it runs Not sure if that is the best solution On Tue, Feb 11, 2014 at 3:36 PM, Erin Hodgess wrote: > > Hello everyone: > > I got a new 64 bit computer & wanted to install R-3.0.2 from source; > Windows 7. > > I did the Rtoo

Re: [R] svyglm error message

2014-02-11 Thread Claire Wladis
Yes, when I say that the cells are blank in the data frames I do mean that the contents of the cells are blank characters "". I have put in a lot of time trying to understand R, but I have no formal programming background, so I do not necessarily always know the correct terminology for something, a

Re: [R] svyglm error message

2014-02-11 Thread Bert Gunter
Disclaimer: I have not followed this thread and claim no statistical expertise. I just wanted to point out a couple of misconceptions that may be relevant. Inline below. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not know

[R] metafor package

2014-02-11 Thread Nathan Pace
Hi, I have a random effects meta analysis of a proportion (logit transformation) using rma.glmm. I have created a forest plot of the proportion (inverse logic transformation) using forest.rma. I have added the credibility interval. The forest plot is saved as a pdf. The dotted line and whisk

Re: [R] svyglm error message

2014-02-11 Thread Claire Wladis
Thanks for your reply, Thomas. Yes, this is NCES data. There are no negative or missing weights. I am not a programmer and so I'm afraid I don't understand what you mean by not being able to have blank cells in a data.frame object - What I mean specifically is that in the csv file which I impor

[R] installing from source on a new Windows machine

2014-02-11 Thread Erin Hodgess
Hello everyone: I got a new 64 bit computer & wanted to install R-3.0.2 from source; Windows 7. I did the Rtools and did the prelims on the installation. However, this is what I got from the "make": c:\R64\R-3.0.2\src\gnuwin32>make all recommended cat MkRules.local MkRules.rules > MkRules --

Re: [R] value on logarithmic axis

2014-02-11 Thread Jim Lemon
Luigi Marongiu wrote: dear all, I have a xy plot in which x is logarithmic. The plot is fine, and I can also represent the logarithimic axis usign a tip given me by William Dunlap. However I would like to plot the actual x value rather than the log10 s in this case. If I remove the xaxt="n" the

Re: [R] value on logarithmic axis

2014-02-11 Thread David Carlson
To prevent R from using scientific notation set the scipen option and probably cex.axis to reduce the axis text or some of the tick marks will be skipped: options(scipen=10) plot(x, y, pch=16, type="b", log="x", cex.axis=.8, ylab=expression(bold("Y axis")), xlab=expression(bold("X axis"))) T

Re: [R] if(...){next} with "foreach" loop?

2014-02-11 Thread Greg Snow
Since you may eventually do this in parallel (the reason for doing foreach), it seems inefficient to use the overhead of sending a proccess to a core only to have it skip any computations. I think instead I would create the combinations with `expand.grid` and then remove the rows corresponding to

[R] turn string into expression for paste

2014-02-11 Thread Dustin Fife
I have a list of variables of a variable length (e.g., Var1, Var2, Var3, ... Vark). What I want to do is somehow feed that information into the paste function, like: paste(Var1, Var2, Var3...) The problem is that I don't want to hard-code it because it's wrapped within a function. Is there a way

Re: [R] turn string into expression for paste

2014-02-11 Thread Dustin Fife
do.call did it. (and I learned a new function!) Thanks for the help, everyone. On Tue, Feb 11, 2014 at 2:24 PM, arun wrote: > Hi, > May be this helps: > Var1 <- LETTERS[1:3] > Var2 <- 1:2 > do.call(paste0,expand.grid(lapply(VarNames,get))) > #[1] "A1" "B1" "C1" "A2" "B2" "C2" > A.K. > > > > >

Re: [R] turn string into expression for paste

2014-02-11 Thread arun
Hi, May be this helps: Var1 <- LETTERS[1:3]  Var2 <- 1:2  do.call(paste0,expand.grid(lapply(VarNames,get))) #[1] "A1" "B1" "C1" "A2" "B2" "C2" A.K. On Tuesday, February 11, 2014 3:18 PM, Dustin Fife wrote: I have a list of variables of a variable length (e.g., Var1, Var2, Var3, ... Vark). Wha

Re: [R] turn string into expression for paste

2014-02-11 Thread Bert Gunter
?do.call Bert Sent from my iPhone -- please excuse typos. > On Feb 11, 2014, at 12:15 PM, Dustin Fife wrote: > > I have a list of variables of a variable length (e.g., Var1, Var2, Var3, > ... Vark). What I want to do is somehow feed that information into the > paste function, like: > > paste

Re: [R] Regression of complex-valued functions

2014-02-11 Thread Duncan Murdoch
On 11/02/2014 2:10 PM, David Winsemius wrote: On Feb 9, 2014, at 2:45 PM, Andrea Graziani wrote: > Hi everyone, > > I previously posted this question but my message was not well written and did not contain any code so I will try to do a better job this time. > > The goal is to perform a non-lin

Re: [R] (no subject)

2014-02-11 Thread David Winsemius
On Feb 11, 2014, at 5:26 AM, Val wrote: > Hi all, > I have a sample of data set with variables day, ID,var and month: > day ID var Month > 1 11 x March > 1 11 x March > 1 11 x April > 1 11 y March > 1 11 x March > 1 11 y March > 2 11 x March > 2 11 y March > 3 11 x March > 3

Re: [R] Regression of complex-valued functions

2014-02-11 Thread David Winsemius
On Feb 9, 2014, at 2:45 PM, Andrea Graziani wrote: > Hi everyone, > > I previously posted this question but my message was not well written and did > not contain any code so I will try to do a better job this time. > > The goal is to perform a non-linear regression on complex-valued data. > I

[R] Font Path question

2014-02-11 Thread James W. MacDonald
I am having weird problems where more recent installs of R cannot find the Font path. I don't have sudo access, so install R in my personal directory on an Ubuntu box, from source. $ ls -lah R-3.0.1/bin/ | grep -w R -rwxr-xr-x 1 jmacdon staff 8.5K Aug 30 14:04 R $ ls -lah R-3.0.2/bin/ | grep -

Re: [R] svyglm error message

2014-02-11 Thread Thomas Lumley
This is some sort of NCES data, right? I can't see any way to get that particular error (which happens inside glm.fit()) for a logistic model. Are there any negative or missing weights? What do you mean 'represented by blank cells' -- you can't have blank cells in a data.frame object? What d

Re: [R] (no subject)

2014-02-11 Thread arun
Hi, May be this helps: dat <- read.table(text="day ID var  Month   1 11  x March   1 11  x March   1 11  x April   1 11  y March   1 11  x March   1 11  y March   2 11  x March   2 11  y March   3 11  x March   3 11  y March   4 11  y March",sep="",header=TRUE,stringsAsFactors=FALSE)  indx <- wit

[R] value on logarithmic axis

2014-02-11 Thread Luigi Marongiu
dear all, I have a xy plot in which x is logarithmic. The plot is fine, and I can also represent the logarithimic axis usign a tip given me by William Dunlap. However I would like to plot the actual x value rather than the log10 s in this case. If I remove the xaxt="n" the plot reports the scientif

Re: [R] Problem with metaMDS in vegan

2014-02-11 Thread Fabian B
Thank you very much! This is exactly the problem, I am in. I ran the NMDS for only one gender and it shows me the results, I was expecting. I was told to use bray-curtis, because there are a lot of "0"s in my data set and in e.g. manhattan these would have to much influence on the result. But in

Re: [R] select groups

2014-02-11 Thread arun
Hi, Try: set.seed(42)  dat <-as.data.frame(matrix(sample(20:100,4*45,replace=TRUE),ncol=4)) set.seed(345)  dat <- within(dat,class1 <- sample(letters[1:3],45,replace=TRUE) )  table(dat$class1)*0.4 # #  a   b   c #6.0 4.8 7.2 set.seed(85) res <- do.call(rbind,lapply(split(dat,dat$class1),function

Re: [R] Help with SEM: "Error in 1:m : NA/NaN argument"

2014-02-11 Thread John Fox
Dear Annalisa, > -Original Message- > From: Annalisa Stacchini [mailto:s.ann...@hotmail.it] > Sent: Tuesday, February 11, 2014 10:29 AM > To: John Fox > Subject: RE: [R] Help with SEM: "Error in 1:m : NA/NaN argument" > > > Kind Prof. Fox, > thanks for your attention, > > > 1) to read

Re: [R] help

2014-02-11 Thread Jeff Newmiller
More importantly, it is identified as inappropriate in the posting guide, so such message threads are off topic. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. #

Re: [R] R help

2014-02-11 Thread arun
Hi, My solution was based on the input dataset you showed.  If xy@12_g.com is "xy1...@gmail.com" (or both of them exist in the dataset??  Not clear!)., then try: dat <- read.table(text="Emails  mal...@gmail.com mah...@gmail.com x...@gmail.com ravi_...@yahoo.com lavk@rediff.com xy1...@g

Re: [R] help

2014-02-11 Thread Bert Gunter
Homework? Most of us won't do homework here. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." H. Gilbert Welch On Tue, Feb 11, 2014 at 12:54 AM, Amaleswara Rao wrote:

Re: [R] How to write a regression model for finding the radius of a cylinder given height and volume

2014-02-11 Thread Rui Barradas
Hello, It really looked like homework. As for your question, maybe this helps. URL <- "http://r.789695.n4.nabble.com/file/n4685033/cylinder.dat"; cyl <- read.table(URL, header = TRUE) plot(vol ~ ht, data = cyl) The vectors you want are simply cyl$vol cyl[["vol"]] cyl[[1]] and the same for hei

[R] help

2014-02-11 Thread Amaleswara Rao
I Have Take 3 Numeric Values 1.Is Age 2.Is Income 3.Is Cast If We Have To Arranged In Order Is Age Income Cast 15 15000 5000 18 12000 4500 20 16000 6000 25 22000 11000 28 11000 6000 30 9000 7000 32 15000 7000 In This Way Write A Programe Arranging Each Variable Intervals Like 10

[R] need for help!

2014-02-11 Thread abeer al-sheikh
good morning you.. i'm in a baad need for help in a causality test an cointegration between two time series in r programming language ..i'll be very thankful if you could help me.. [[alternative HTML version deleted]]

Re: [R] (no subject)

2014-02-11 Thread John Kane
https://github.com/hadley/devtools/wiki/Reproducibility http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example John Kane Kingston ON Canada > -Original Message- > From: ma_rw...@yahoo.com > Sent: Sat, 8 Feb 2014 06:40:18 -0800 (PST) > To: r-help@r-project

Re: [R] Split dataframe by year

2014-02-11 Thread John Kane
first <- subset(dat1, dat1$var <=1960) Reverse inequality for the other one. Hints on how to ask questions on R-help https://github.com/hadley/devtools/wiki/Reproducibility http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example John Kane Kingston ON Canada

Re: [R] (no subject)

2014-02-11 Thread John Kane
I don't quite understand what you are looking for. I originally thought that a simple subset would do it but I don't understand the selection criteria are for the output data file.s Original idea: want <- subset(dat1, dat1$var =="y") John Kane Kingston ON Canada > -Original Message---

Re: [R] Help with SEM: "Error in 1:m : NA/NaN argument"

2014-02-11 Thread John Fox
Dear Annalisa, I was unable to load either of the data sets that you provided, obtaining the following message: -- snip > load(file.choose()) Error: bad restore file magic number (file may be corrupted) -- no data loaded In addition: Warning message: file 'CC32.Rdata' has magic

Re: [R] How to write a regression model for finding the radius of a cylinder given height and volume

2014-02-11 Thread David Carlson
?colnames > a <- matrix(sample.int(10), 5, 2) > str(a) int [1:5, 1:2] 10 1 8 6 4 2 7 9 3 5 > colnames(a) NULL > colnames(a) <- c("volume", "height") > colnames(a) [1] "volume" "height" > a volume height [1,] 10 2 [2,] 1 7 [3,] 8 9 [4,] 6 3 [5,] 4

Re: [R] Problem with default location of workspace in RStudio

2014-02-11 Thread Ista Zahn
Wrong list, ask on the rstudio support forum On Feb 11, 2014 8:10 AM, "Partho Sarkar" wrote: > Hi all, > > I hope this question has not been repeated recently! I am new to R- > I am using RStudio version 0.97.551 with R version 3.0.2 - and have a > problem with the default directory from which

Re: [R] lattice question: removing strips

2014-02-11 Thread Gerrit Draisma
Dear Martin, Would - library(latticeExtra) useOuterStrips(p) - be useful for you? Gerrit. -- Message: 1 Date: Mon, 10 Feb 2014 14:12:45 +0200 (EET) From: Martin Ivanov To: Pascal Oettli Cc: r-help@r-pr

[R] (no subject)

2014-02-11 Thread Val
Hi all, I have a sample of data set with variables day, ID,var and month: day ID var Month 1 11 x March 1 11 x March 1 11 x April 1 11 y March 1 11 x March 1 11 y March 2 11 x March 2 11 y March 3 11 x March 3 11 y March 4 11 y March In the above data set there a

[R] Problem with default location of workspace in RStudio

2014-02-11 Thread Partho Sarkar
Hi all, I hope this question has not been repeated recently! I am new to R- I am using RStudio version 0.97.551 with R version 3.0.2 - and have a problem with the default directory from which the workspace is loaded at startup. [I am not using projects] I have a directory with my data files, a

Re: [R] if(...){next} with "foreach" loop?

2014-02-11 Thread Marc Marí Dell'Olmo
You are absolutly right! I can use If(!cond) inside the loop. Thank you! 2014-02-11 12:43 GMT+01:00 Duncan Murdoch : > On 14-02-11 5:30 AM, Marc Marí Dell'Olmo wrote: > >> Dear all, >> >> I want to do a loop with foreach. But, I would like to include a condition >> with "next" to don't loop ove

Re: [R] if(...){next} with "foreach" loop?

2014-02-11 Thread Duncan Murdoch
On 14-02-11 5:30 AM, Marc Marí Dell'Olmo wrote: Dear all, I want to do a loop with foreach. But, I would like to include a condition with "next" to don't loop over some elements. For example, I would like to translate this "for loop" to a "foreach loop": for (i in 1:10) { for (j in 1:2) {

Re: [R] building a package

2014-02-11 Thread Duncan Murdoch
On 14-02-10 11:45 PM, Cathy Lee Gierke wrote: Hi, I'm building a package in R and not able to find key information for a couple of things. 1. I have a .png graphic that the R code uses in print-outs it creates. What is the appropriate folder, or manner to incorporate a .png into the package?

Re: [R] if(...){next} with "foreach" loop?

2014-02-11 Thread Marc Marí Dell'Olmo
Dear Petr, you have to install the "foreach" library: http://cran.r-project.org/web/packages/foreach/foreach.pdf I include the option %do% to execute the expression sequentially (see manual). I want to use foreach instead of for, because with "foreach" is possible to do a loop in parallel and I'

Re: [R] if(...){next} with "foreach" loop?

2014-02-11 Thread PIKAL Petr
Why? Are you 100% sure that you need to use for loop? What is %do%, I did not find it among standard R functions? Regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Marc Marí Dell'Olmo > Sent: Tuesday, February 11

[R] if(...){next} with "foreach" loop?

2014-02-11 Thread Marc Marí Dell'Olmo
Dear all, I want to do a loop with foreach. But, I would like to include a condition with "next" to don't loop over some elements. For example, I would like to translate this "for loop" to a "foreach loop": for (i in 1:10) { for (j in 1:2) { ... if((i==2 & j==1) | (i==4 & j==3)) { next }

Re: [R] Trouble with pmvnorm?

2014-02-11 Thread Paul Parsons
Of course, sorry... The approach below is indeed a much slicker way to calculate the probability of the ith variable being the smallest: #construct a new mv norm distribution, for y = x - x_i #define y = Bx, where B is a matrix B <- matrix(rep(0,25),nrow=5) diag(B) <- rep(1,5) B[,i] <- -1 B <- B[-

Re: [R] Problem with metaMDS in vegan

2014-02-11 Thread Jari Oksanen
Fabian B freenet.de> writes: > > Thanks for the fast response! > > My data is actually just the percentages of the substances found in the > cuticular layer of the flies. The quantitative and qualitative composition > of this layer differs in gender, locality and so on. > My 70 „species“ are t

Re: [R] Regression of complex-valued functions

2014-02-11 Thread Rolf Turner
I have not the mental energy to go through your somewhat complicated example, but I suspect that your problem is simply the following: The function nls() is trying to minimize a sum of squares, and that does not make sense in the context of complex observations. That is, nls() is trying to

Re: [R] hepl

2014-02-11 Thread PIKAL Petr
Hi see ?cut ?factor And if you are in reading those two help pages, you could possibly also to glimpse to R-intro. Regards Petr PS. do not post in HTML, your post will get scrammbled. > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org]