Re: [R] spped up a function

2013-07-08 Thread Santiago Guallar
Hi Petr, yes the function basically consists on merging two time series with different time intervals: one regular 'GPS' and one irregular 'xact' (the latter containing the binomial variable 'wd' that I want to add to 'GPS'. Apparently my attachments did not go through. Here you have the dputs yo

Re: [R] A question on the abline function

2013-07-08 Thread PIKAL Petr
Hi you did not provide enough info for resolving your error (at least not enough for myself). How did you call abline? Standard way of calling abline is: fit <- lm(...) abline(fit) So please provide code you used, R version maybe OS and probably some data to play with. Regards Petr >

Re: [R] Installing R on Fedora 18 Linux?

2013-07-08 Thread Spencer Graves
Thanks for the replies from Peter Langfelder and Ranjan Maitra. I tried su, "yum install R-core". That installed R 3.0.1. To install packages like zoo and RCurl, I had to install other software, but with the help of a friend, Google, and previous replies to similar questions on R

Re: [R] Help with installing a .tar.gz package on windows

2013-07-08 Thread Lucy Leigh
Great thank you - are there any resources that step through how to use RTools to compile the source package and install it in R on (64-bit windows) ? >>> Berend Hasselman 8/07/2013 6:38 pm >>> On 08-07-2013, at 02:15, "Lucy Leigh" wrote: > Hi, > I have a source package that isn't available as

Re: [R] Constructing a matrix of outputs from loop

2013-07-08 Thread David Winsemius
On Jul 8, 2013, at 2:14 PM, Bert Gunter wrote: > David: > > Perhaps not. func() must be vectorized for this to work. > > -- Bert > > > On Mon, Jul 8, 2013 at 2:06 PM, David Carlson wrote: >> ?outer >> >> e.g. output <- outer(ap, am, func) >> >> - >> Davi

[R] simple Rcpp function produces: "AddressSanitizer: attempting free on address which was not malloc"

2013-07-08 Thread Nick Matzke
I have an R package, cladoRcpp, which is up on CRAN. After a minor update, which compiled without errors on R CMD check on my machine, I submitted the update. Brian Ripley got an error that I didn't get: == We still see > Rcpp_

Re: [R] Constructing a matrix of outputs from loop

2013-07-08 Thread Bert Gunter
David: Perhaps not. func() must be vectorized for this to work. -- Bert On Mon, Jul 8, 2013 at 2:06 PM, David Carlson wrote: > ?outer > > e.g. output <- outer(ap, am, func) > > - > David L Carlson > Associate Professor of Anthropology > Texas A&M University

Re: [R] Constructing a matrix of outputs from loop

2013-07-08 Thread David Carlson
?outer e.g. output <- outer(ap, am, func) - David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77840-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of

[R] Complex Association Plots

2013-07-08 Thread Olga Musayev
I'm new to R plotting, so please be gentle. I want to make a large association plot, showing whether each combination of variables averages more or less than the whole for proportion in a certain category. So, for example: Dependent Variable: eye color (30% green, 45% brown, 25% blue on average)

Re: [R] xts zoo "cannot remove prior installation of package"

2013-07-08 Thread Pooya Lalehzari
Thank you for your help. It seems like there was an issue with the libPath. The path is setup to reference a cached copy of a shared drive and somehow the cache and the shared drive were not synching. I finally located the real place (i.e. the cached area) where R was looking and manually remove

Re: [R] xts zoo "cannot remove prior installation of package"

2013-07-08 Thread David Winsemius
On Jul 8, 2013, at 10:21 AM, Pooya Lalehzari wrote: > Hello, > Some how, my xts/zoo package ran into trouble. I tried to re-install the > packages, I get an error that it cannot remove the prior installation. > I uninstalled R and the deleted all the libraries and reinstalled everything > fresh

[R] Constructing a matrix of outputs from loop

2013-07-08 Thread Edward Patzelt
R - I would like to construct a matrix from the output of a loop that has 2 values it varies over the course of the loop creating a 20x20 matrix of output values: ap = logspace(-3, 0, 20) am = logspace(-3, .7, 20) for (ap in apList) { for (am in amList) { output = func(ap, am) } }

Re: [R] A question on the abline function

2013-07-08 Thread David Carlson
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. First read the instructions for posting. You gave us no data, no code, no example. Just an error message out of context.

Re: [R] retrieve data from summary output

2013-07-08 Thread Bert Gunter
1. It's a summary **object**, not a file. 2. ?summary.glm 3. Read "An Introduction to R" and ?"[" to learn how to work with lists and extraction functions, which are essential. 4. Also methods(print) stats:::print.summary.glm ## for code of how object is printed Cheers, Bert On Mon, Jul 8,

Re: [R] disabling vignette creation in R CMD build

2013-07-08 Thread Prof Brian Ripley
On 08/07/2013 20:20, Witold E Wolski wrote: While developing a package I would like to disable vignette creation when executing R CMD build. The vignette creation is costly so I would prefer not to have to regenerate it every time. Why not read the documentation? As the exact answer depends on

Re: [R] retrieve data from summary output

2013-07-08 Thread Sarah Goslee
Try names(summary (plasma_glm_1)) You can extract named components individually, just as you would for any other R object. Sarah On Mon, Jul 8, 2013 at 7:57 AM, Hermann Norpois wrote: > Hello, > > how can I retrieve electively data from a summary file, for instance I > would like to get the Pr

[R] A question on the abline function

2013-07-08 Thread Xu, Jia2
Dear whom it may concerns, I am Jia Xu, a summer intern analyst at Citi Research. I am also a graduate student studying Financial Engineering at Cornell. I am running regression analysis with Rstudio now. I have been experiencing difficulty with the abline function. No matter I call it directly

[R] retrieve data from summary output

2013-07-08 Thread Hermann Norpois
Hello, how can I retrieve electively data from a summary file, for instance I would like to get the Pr of Coefficients Thanks > summary (plasma_glm_1) Call: glm(formula = ESR ~ fibrinogen, family = binomial(), data = plasma) Deviance Residuals: Min 1Q Median 3Q Max -0.9298

[R] R installation Problem

2013-07-08 Thread sridhar srinivasan
Dear R Developers, I have two doubts related to R 1. i try to install R package 3.0 in my linux system ./configure. it gives Error as configure: error: --with-readline=yes (default) and headers/libs are not available 2. This is related to library i am trying to install the library(cummeRbund) in

[R] (no subject)

2013-07-08 Thread Asan Ramzan
Hello R-help   Does anyone know if there is a package for global fit analysis and if so how to use it.  I am trying to calculate the Kd value of a protein interacting with  its ligand (When protein interacts with ligand this effect a number of residues). The table below shows with increasing conc

[R] disabling vignette creation in R CMD build

2013-07-08 Thread Witold E Wolski
While developing a package I would like to disable vignette creation when executing R CMD build. The vignette creation is costly so I would prefer not to have to regenerate it every time. regards -- Witold Eryk Wolski [[alternative HTML version deleted]] __

Re: [R] Need hep for converting date data in POSIXct

2013-07-08 Thread laila
Hi Arun, I think that my data has another format. When I type the comand dput(time), it appears the following information: structure(list(date = structure(c(696L, 18L, 19L, 43L, 44L, 45L, 67L, 68L, 94L, 95L, 117L, 118L, 141L, 142L, 167L, 168L, 193L...), .Label = c("01/01/2011 12:32", "01/02

[R] "error setting certificate" issue in R-studio

2013-07-08 Thread Mary Huynh
Hi all, I'm a newbie to R and I can't figure out how to fix this error I keep getting in R-studio: > "error setting certificate verify locations:\n CAfile: \n CApath: none\n" Error in twInterfaceObj$doAPICall(cmd,params,"GET",...) : Error: error setting certificate verify locations: CAfile: CAp

[R] error in "predict.gam" used with "bam"

2013-07-08 Thread julian.bothe
Hello everyone. I am doing a logistic gam (package mgcv) on a pretty large dataframe (130.000 cases with 100 variables). Because of that, the gam is fitted on a random subset of 1. Now when I want to predict the values for the rest of the data, I get the following error: > gam.basis_al

Re: [R] abbreviating words in a model formula

2013-07-08 Thread William Dunlap
The call to all.names() below probably should have the unique=TRUE argument. It doesn't make any difference in this particular code, but having repeated names could cause problems in related code. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help

Re: [R] abbreviating words in a model formula

2013-07-08 Thread Jeff Newmiller
Your cart is stuck in front of your horse. This will be WAY easier to accomplish if you rename your columns in your input data frame before fitting the model. --- Jeff NewmillerThe .

Re: [R] abbreviating words in a model formula

2013-07-08 Thread William Dunlap
Try using all.names() to get all the names in the formula. E.g., f <- function (formula, minNameLength = 2, abbreviateFunctionNames = FALSE) { names <- all.names(formula, functions = abbreviateFunctionNames) abbrNames <- lapply(abbreviate(names, minlength = minNameLength), as.name

[R] abbreviating words in a model formula

2013-07-08 Thread Michael Friendly
For an application, I need to get a character string representation of the formula or model call for glm objects, but also, for labeling output and plots, I want to be able to abbreviate the words (variables) in model terms. This requires some formula magic that I can't quite get, in particular

Re: [R] xts zoo "cannot remove prior installation of package"

2013-07-08 Thread Prof Brian Ripley
On 08/07/2013 18:21, Pooya Lalehzari wrote: Hello, Some how, my xts/zoo package ran into trouble. I tried to re-install the packages, I get an error that it cannot remove the prior installation. I uninstalled R and the deleted all the libraries and reinstalled everything fresh. It still complai

Re: [R] Lattice barchart with error bars

2013-07-08 Thread S Ellison
> > Anyone know what the 95% confidence > > interval of the median would be? For an R answer you could get one for each group from wilcox.test( , conf.int =TRUE ) and build that into an alternative boxplot stats function which you could specify in your bwplot call. Steve Ellison

[R] xts zoo "cannot remove prior installation of package"

2013-07-08 Thread Pooya Lalehzari
Hello, Some how, my xts/zoo package ran into trouble. I tried to re-install the packages, I get an error that it cannot remove the prior installation. I uninstalled R and the deleted all the libraries and reinstalled everything fresh. It still complains the same thing. I try to remove.packages("z

Re: [R] Splitting coordinates into two

2013-07-08 Thread Pancho Mulongeni
Thank you, So my mistake was my data was a factor and not character,for strsplit Thanks so much -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: 08 July 2013 15:55 To: Pancho Mulongeni Cc: r-help@r-project.org Subject: Re: [R] Splitting coordinates into two Hell

Re: [R] Splitting coordinates into two

2013-07-08 Thread Rui Barradas
Hello, Try the following x <- structure(...) sp <- strsplit(as.character(x), ",") G1 <- sapply(sp, `[`, 1) G2 <- sapply(sp, `[`, 2) Hope this helps, Rui Barradas Em 08-07-2013 14:49, Pancho Mulongeni escreveu: Hi users, I have a simple vector of five coordinates in form of ('lat1, long1'

Re: [R] multcomp on significant interaction in coxme model

2013-07-08 Thread Terry Therneau
--- most of the message deleted Performing exactly the same routine with the same data on a logistic model with family=binomial does not give this error message. So my question is, what am I missing here? Thanks, for any possible input I'm not a user of multcomp, so will follo

Re: [R] ggplot2

2013-07-08 Thread AlexPiche
if anyone was interested ggplot(xmelt, aes(x=factor(Var1),value, row=L1, col=Var2, group=Var2, fill=factor(Var1))) + geom_bar(stat="identity")+ facet_grid(Var2~L1, scale="free") + xlab("Maturities") + ylab("Basis Points Move") + theme(legend.position = "none") + scale_fill_grey(start=0.8,end=0.3

Re: [R] Splitting coordinates into two

2013-07-08 Thread arun
Hi, vec1<- structure(c(. vec1 #[1] -22.576608,17.07859  -24.621739,17.959728 -26.567955,18.134651 #[4] -22.832516,17.183304 -21.980459,16.91328 #43 Levels: -17.394217,15.886574 -17.406994,14.393463 ... -28.017742,18.745594 G1<-sapply(strsplit(as.character(vec1),","),`[`,1)  G2<-sapply(strsp

[R] Splitting coordinates into two

2013-07-08 Thread Pancho Mulongeni
Hi users, I have a simple vector of five coordinates in form of ('lat1, long1','lat2,long2',...,'latn,longn') And I would like to create two vectors, one just with the first coordinate G1<-c('lat1,'lat2',..,'latn') G2<-c('long1,'long2',...,'longn') I am trying to apply strsplit(x=g,split=',') on

[R] ggplot2

2013-07-08 Thread AlexPiche
Hello Folks, I have an other problem with ggplot2. This is what I got so far. levels(xmelt$Var2) <- c("Outright", "Market Move Adjusted") ggplot(xmelt, aes(x=factor(Var1),value, row=L1, col=Var2, group=Var2)) + geom_bar(stat="identity") + facet_grid(Var2~L1, scale="free") + xlab("Maturities")

Re: [R] Meta-analysis on a repeated measures design with multiple trials per subject using metafor

2013-07-08 Thread Viechtbauer Wolfgang (STAT)
It seems to me that the most straightforward approach would be to pool the b coefficients directly. I assume you used some kind of mixed-effects logistic model to analyze those data for each study with random effects for subjects and a dummy variable for treatment (besides possibly some other co

Re: [R] spped up a function

2013-07-08 Thread PIKAL Petr
Hi It seems to me, that you basically want merge, but I can miss the point. Try post dput(head(xact)) dput(head(GPS)) and what shall be desired result based on those 2 datasets. Regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project

Re: [R] Help with installing a .tar.gz package on windows

2013-07-08 Thread Prof Brian Ripley
On 08/07/2013 01:15, Lucy Leigh wrote: Hi, I have a source package that isn't available as a windows zip file. Can anyone explain to me how I can install this on my windows R platform? I am surprised that is all you saw, but running Rcmd INSTALL PReMiuM_3.0.21.tar.gz at a shell command line s

Re: [R] Help with installing a .tar.gz package on windows

2013-07-08 Thread Berend Hasselman
On 08-07-2013, at 02:15, "Lucy Leigh" wrote: > Hi, > I have a source package that isn't available as a windows zip file. Can > anyone explain to me how I can install this on my windows R platform? > When I use the following code: > install.packages("PReMiuM_3.0.21.tar.gz", type = "source") >

Re: [R] Help with installing a .tar.gz package on windows

2013-07-08 Thread Zsurzsa Laszlo
have you checked the bit version !? Which R do you use? 32 or 64 bit? --- - László-András Zsurzsa, - - Msc. Infromatics, Technical University Munich, - ---

[R] Help with installing a .tar.gz package on windows

2013-07-08 Thread Lucy Leigh
Hi, I have a source package that isn't available as a windows zip file. Can anyone explain to me how I can install this on my windows R platform? When I use the following code: install.packages("PReMiuM_3.0.21.tar.gz", type = "source") I get this error message: * installing *source* packa

Re: [R] Meta-analysis on a repeated measures design with multiple trials per subject using metafor

2013-07-08 Thread Marc Heerdink
Dear Michael and other readers, Please see below for my answers to your questions about my data. On 07/06/2013 02:56 PM, Michael Dewey wrote: [..] Because everything was randomized, I can only calculate the total number of times a certain response was used under each type of trial. There is no

Re: [R] [R-sig-Geo] spatstat output

2013-07-08 Thread Hodgess, Erin
Hello! For the first question, here is an example: > E <- alltypes(bramblecanes, Kest, nsim = 100, envelope = + TRUE,savepatterns=TRUE,correction="isotropic") > E$fns[[1]]$r > E$fns[[1]]$obs From: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-proj

[R] ChoiceModelR

2013-07-08 Thread Michael Riechert
Dear Community, I hope that some of you are a bit experienced with the R package ChoiceModelR by Sermas and Colias, to estimate a Hierarchical Bayes Multinomial Logit Model. Actually, I am quite a newbie on both R and Hierarchical Bayes. However, I tried to get some estimates by using the scrip

Re: [R] Splitting a string expression into components

2013-07-08 Thread Yuliya Matveyeva
strsplit(x, split= " ") 2013/7/3 Dan Murphy > I have a vector of strings that contain mathematical expressions. E.g., > x <- c("5 <= 7", "z = 1+2") > and I would like to decompose each expression into its left- and > right-hand-side components etc., output something like > > "5" "<=" "7" > "z"

Re: [R] Check a list of genes for a specific GO term

2013-07-08 Thread Martin Morgan
Please ask follow-up questions about Bioconductor packages on the Bioconductor mailing list. http://bioconductor.org/help/mailing-list/mailform/ If you are interested in organisms rather than chips, use the organism package, e.g., for Homo sapiens library(org.Hs.eg.db) df0 = select(org.H