[R] AIC for seasonal decomposition by stl

2012-04-12 Thread Joon-Taek Yoo
Hello I have a question on the seasonal decomposition based on Loess smoothing (called "stl") for the R statistics package. I am wondering how to calculate value of AIC (Akaike Information Criterion) for the seasonal decomposition by stl in R. Thanks, [[alternative HTML version deleted]

[R] How to calculate confidence interval using bootstrap

2012-04-12 Thread Jane
Dear List, If I build a model based on training set, and calculate the predictive AUC on test set using that model, how should I calculate the 95%CI for this predictive AUC using bootstrap method? The SE should be calculated on training set or test set, or combine them together? I feel confused ab

Re: [R] unable to install "robust" in R 2.15 with g++ 4.7

2012-04-12 Thread Prof Brian Ripley
On 13/04/2012 04:26, Suresh Kumar wrote: Hi, I am unable to install "robust" package (g++ compile error occurs) if the g++ version is 4.7. However, for g++ 4.6 i am able to install. I was trying to do this in Ubuntu 12.04. R 2.15 itself was installed from the PPA, https://launchpad.net/~marutte

[R] Lobbying database

2012-04-12 Thread Spencer Graves
Hi, Joseph: What are your priorities regarding the US lobbying database? At "http://www.senate.gov/legislative/Public_Disclosure/LDA_reports.htm";, I see 4 links: * Search the Lobbying Database (LD-1, LD-2) * Download a Lobbying Docum

[R] how to compare cross-validated C-index and calculate confidence interval

2012-04-12 Thread jane.wong
Dear list If I calculate the C-index after 10-fold cross-validation based on Cox model, which statistic test should I used to compare two C-statistic values.I means I use cross-validation to obtain a predictive probability for each individual, then combine all the probabilities to calculate the C-

Re: [R] Reading SPSS: underlying numerical codes

2012-04-12 Thread Michael Bibo
Marion Wenty gmail.com> writes: > I have got a question concerning the underlying numerical codes when > reading an SPSS file into R. > > I used the package foreign and when I look at a variable I get the verbal > codes. > > I would like to know how it is possible to get the underlying numeric

[R] unable to install "robust" in R 2.15 with g++ 4.7

2012-04-12 Thread Suresh Kumar
Hi, I am unable to install "robust" package (g++ compile error occurs) if the g++ version is 4.7. However, for g++ 4.6 i am able to install. I was trying to do this in Ubuntu 12.04. R 2.15 itself was installed from the PPA, https://launchpad.net/~marutter/+archive/rrutter. Is it a bug? thanks s

[R] Rprofile.site?

2012-04-12 Thread Spencer Graves
Hello: I've been using "Rprofile.site" for several years to set the repos environment variable as follows: options(repos=c(CRAN='http://cran.cnr.berkeley.edu', CRANextra='http://www.stats.ox.ac.uk/pub/RWin') ) However, R 2.15.0 is not recognizing this. Instead,

Re: [R] Help with vectorization

2012-04-12 Thread ilai
Michael originally suggested ?outer. I think that was enough in this case (no need for mv or sapply): wlpk3 <- outer(k3,wl,'+') ln.phiDIC <- log(k1)+k2/wlpk3 phiDIC<- t(exp(ln.phiDIC)) colnames(phiDIC)<- stations str(phiDIC) Cheers On Thu, Apr 12, 2012 at 8:58 PM, R. Michael Weylandt wrote: >

[R] caret package: custom summary function in trainControl doesn't work with oob?

2012-04-12 Thread Matthew Francis
Hi all, I've been using a custom summary function to optimise regression model methods using the caret package. This has worked smoothly. I've been using the default bootstrapping resampling method. For bagging models (specifically randomForest in this case) caret can, in theory, uses the out-of-b

Re: [R] Help with vectorization

2012-04-12 Thread R. Michael Weylandt
Strange, that isn't the error I get: > mouter(wl, k1, k2, k3, FUN = function(w, k1, k2, k3) k1 *exp(k2 / (w + k3))) Error in FUN(X, Y, ...) : argument "k2" is missing, with no default Still, it's a problem with my mouter() function which was only tested on binary operators (and then only really

[R] Plotting leapfrog in R

2012-04-12 Thread Colstat
Dear List Is there a package for leapfrog plotting (Hamiltonian Monte Carlo estimation) in R? I tried the actual "LEAPFrOG" package which doesn't actually give the plot like this one? http://xianblog.files.wordpress.com/2010/09/hamilton.jpg How doe one plot this in R? So, there semi-circle and

Re: [R] directory of current script

2012-04-12 Thread Thomas Lumley
On Fri, Apr 13, 2012 at 11:37 AM, pdb wrote: > I am running a series of scripts sequentially and they all need some global > parameters. These will be included in a file in a known sub directory as the > scripts themselves. > > The scripts need to be run by anyone without ANY editing. > > Question

Re: [R] directory of current script

2012-04-12 Thread David Winsemius
On Apr 12, 2012, at 7:37 PM, pdb wrote: I am running a series of scripts sequentially and they all need some global parameters. These will be included in a file in a known sub directory as the scripts themselves. The scripts need to be run by anyone without ANY editing. Question is: Is t

Re: [R] Simple Problem: Plotting mathematical functions

2012-04-12 Thread David Winsemius
On Apr 12, 2012, at 3:49 PM, Aye wrote: Okay, i got this far: f <- function(x) 0.25*x^2 + 6.47*x -32.6 g <- function(x) 0.99*x^2 -6*x -195 h <- function(x) 0.77*x^2 +14*x -495 j <- function(x) 0.001*x^2 + 65*x -785 k <- function(x) 0.9*x^2 -2*x -63

[R] Can I use a simple linear regression in this situation

2012-04-12 Thread Honos
Hi everybody, I'm learning R and statistics and wanted to use a real case scenario for my study... however a colleague is convinced my use of the linear regression function is incorrect. Could you please help clarify if what I'm doing is wrong? And in particular why is wrong? I was thinking to

Re: [R] scatter3d: problem with spheres-color

2012-04-12 Thread John Fox
Dear Duncan, I'm now home and have access to Windows and Mac OS X systems, but not Ubuntu. scatter3d(prestige ~ income + education | type, data=Prestige) works perfectly fine on both the Windows and Mac systems, as do the rgl.spheres() and spheres3d() commands that you suggested trying. I thin

Re: [R] how to add 3d-points to bplot {rms} figure?

2012-04-12 Thread phi771
h! thank you a lot for your effort and help. i preferred a 3d view of the surface in order to see how well it fits the real data (from the file). i will play around with the functions you have mentioned and post my results or further problems. this will probably take a few days :( can anybody ans

Re: [R] Support for R in highlight.js

2012-04-12 Thread Ivan Sagalaev
highlight.js generally allows for more sophisticated highlighting. I believe this might be the reason why people at Kaggle are looking for it. Thanks for the pointer anyway! On 04/12/2012 07:25 AM, Yihui Xie wrote: There are numerous JS libraries for syntax highlighting. I have never tried hig

[R] using wildcards in download.file?

2012-04-12 Thread jtang
Hi, Do you know whether it is possible to use wildcards in download.file()? For example: url = "ftp://abc.com/*.*"; # to download all the files in the ftp folder download.file(url,destfile=...) # does not work, any solutions? Thanks! JIng __ R-help@r-

[R] Generate combination of strings

2012-04-12 Thread Bart6114
Hey all, I am trying to generate a number of vectors with string combinations. The below code solves my initial problem, however I would prefer not hardcoding the positions of the 'objects' as in the future the number of 'objects' could increase. Is there a way to loop over these objects and gener

Re: [R] Help with vectorization

2012-04-12 Thread Filoche
Hi and thank you for your time. I got this error when trying your function. mouter(wl, k1, k2, k3, FUN = function(w, k1, k2, k3) k1 *exp(k2 / (w + k3))) "Error in k3/(w + k3) : 'k3' is missing" Regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Help-with-vectorization

[R] directory of current script

2012-04-12 Thread pdb
I am running a series of scripts sequentially and they all need some global parameters. These will be included in a file in a known sub directory as the scripts themselves. The scripts need to be run by anyone without ANY editing. Question is: Is there a command to return the directory of the c

Re: [R] How to automate creation of plots (create series of plots)

2012-04-12 Thread Magdalena A. Tkacz
Hi. Yes, that was about scatterplot. Your suggestion is what I really want. Works excellent!! Thank you very much. Your question about the values and the headers... I'm trying to develop new clustering algorithm. I'm changing this algorithm's parameter and trying to "tune it up" in dependency of

Re: [R] Michaelson-Morley Speed of Light Data

2012-04-12 Thread Křištof Želechovski
Dnia czwartek, 12 kwietnia 2012 08:51:06 Michael Friendly pisze: > The same data, with the proper citations to Michelson(1882) and > Stigler(1977) are contained in the HistData package as data(Michelson) > See > library(HistData) > example(Michelson) That is not much of relief, given that this par

Re: [R] Simple Problem: Plotting mathematical functions

2012-04-12 Thread Aye
Okay, i got this far: f <- function(x) 0.25*x^2 + 6.47*x -32.6 g <- function(x) 0.99*x^2 -6*x -195 h <- function(x) 0.77*x^2 +14*x -495 j <- function(x) 0.001*x^2 + 65*x -785 k <- function(x) 0.9*x^2 -2*x -636 plot(x, f(x), xlab="Elemente in der R

Re: [R] directory of current script

2012-04-12 Thread pdb
I found this... https://stat.ethz.ch/pipermail/r-help/2009-January/184745.html -- View this message in context: http://r.789695.n4.nabble.com/directory-of-current-script-tp4553386p4553409.html Sent from the R help mailing list archive at Nabble.com. _

[R] further hypothesis testing with 'optim' results

2012-04-12 Thread Louis Plough
Hi, I am trying to test whether the maximum likelihood (ML) estimates of a parameter from the the results of running 'optim', are different. After searching the R-help archives, I have seen only 2 prior posts where a less detailed question has been asked about "general hypothesis testing after 'opt

Re: [R] bayesian gene network construction

2012-04-12 Thread Marco Scutari
Hi John, On Wed, Apr 11, 2012 at 17:07, email mail wrote: > I have looked at the bnlearn and deal packages for infering bayesian > network. Can anyone suggest any other suitable package for constructing > bayesian gene regulatory network using gene expression data? The GeneNet package from Korbi

Re: [R] scatter3d: problem with spheres-color

2012-04-12 Thread Duncan Murdoch
On 12/04/2012 2:27 PM, John Fox wrote: Dear René, I've confirmed that the spheres aren't coloured correctly on my Ubuntu system (the first colour is used for all of the spheres), and I know that this works right on Windows, as you mentioned. I'm curious to try it on my Mac, but don't have tha

[R] rgl_0.92.879 package broke with R 2.15

2012-04-12 Thread Grimes Mark
Dear All I am unhappy to report that rgl_0.92.879 gives the following error: Error : .onLoad failed in loadNamespace() for 'rgl', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Library/Frameworks/ R.framework/Versions/2.15/Resources/library/rgl/l

Re: [R] customizing plot, Vegan CCA

2012-04-12 Thread Gavin Simpson
On Wed, 2012-03-28 at 01:43 -0700, millerjeremya wrote: > I’m working on a canonical correspondence analysis using Vegan. > I’m new to this. I would like to control the shapes and colors for each of > my individual display points and can’t figure out the syntax. This comes up so often it is /the

[R] enableJIT(2) causes major slow-up in rpart

2012-04-12 Thread Tal Galili
Hello, Due to exploration of the JIT capabilities offered through the {compiler} package, I came by the fact that using enableJIT(2) can *slow* the rpart function (from the {rpart} package) by a magnitude of about 10 times. Here is an example code to run: library(rpart) require(compiler) enable

[R] Can't get R to recognize Java for rJava installation

2012-04-12 Thread Waichler, Scott R
Hi, I am unable to install the package rJava. I tried doing what the output suggests, but it doesn't help. How can I get R to find/recognize my Java installation? I am running R-2.15.0. waichler@snow> sudo R CMD javareconf Java interpreter : /usr/bin/java Java version : 1.6.0_22 Java home

Re: [R] Organizations where IT has approved the use of R software

2012-04-12 Thread Henrik Bengtsson
May be of use too: The R Foundation for Statistical Computing, R: Regulatory Compliance and Validation Issues - A Guidance Document for the Use of R in Regulated Clinical Trial Environments, August 17, 2008 [http://www.r-project.org/certification.html] /Henrik On Thu, Apr 12, 2012 at 1:06 PM, Th

Re: [R] pyramid.plot in plotrix, axis labelling

2012-04-12 Thread Jim Lemon
On 04/12/2012 09:55 PM, Gavin Rudge wrote: Hi, I've been looking at ways to make pyramid plots in R. I like the pyramid.plot method in plotrix as it seems the simplest to use and building them in ggplot looks a bit more code intensive than I'd like, being as I'm new to R. This package does p

Re: [R] Simple Problem: Plotting mathematical functions

2012-04-12 Thread Matthieu Dubois
Hi, you can use the curve() function for this. It is dedicated to plotting functions. Here is an example # turn your functions into r functions f <- function(x) 0.25 * x^2 + 6.47 * x -32.6 g <- function(x) 0.99*x^2 -6*x -195 j <- function(x) 0.77*x^2 + 14*x -495 k <- functi

Re: [R] Organizations where IT has approved the use of R software

2012-04-12 Thread Thomas Adams
All: R is used by the NOAA/U.S. National Weather Service to generate graphics representing real-time hydrologic ensemble (probabilistic) forecasts. Go to: http://www.erh.noaa.gov/mmefs/ to see. It is also used in research and development for forecast verification and analyses for the calibration

Re: [R] How to automate creation of plots (create series of plots)

2012-04-12 Thread R. Michael Weylandt
I'm not quite sure what you are asking -- when you say an XY plot I presume you mean a scatter plot of X against Y, but how do the values underneath the headers play in? Do you just want different symbols? With a little bit of data wrangling, I think this actually seems quite well suited to the gg

Re: [R] Applying a function to categorized data?

2012-04-12 Thread R. Michael Weylandt
You can also get the official getting started tutorial by typing help.start() at the command prompt. Michael On Thu, Apr 12, 2012 at 2:52 PM, steven mosher wrote: >  Welcome to R and the list. > >  Others may suggest books ( Nutshell was my first ) but first there are > some things that will h

Re: [R] Simple Problem: Plotting mathematical functions

2012-04-12 Thread R. Michael Weylandt
It seems that your first problem is syntax: 2x will thrown an error, while 2*x won't. Google around for a good intro tutorial (there's the main one you can access by typing help.start() and it's quite good) and these sorts of things will be explained. You might also want to use the curve func

[R] Looking for Reduced Major Axis Regression for multivariate case in R?

2012-04-12 Thread Michael
Hi all, Could you please help me? I am looking for such a function for the multi-variate case in R... Alternatively, is it straightforward to write such a function in R? Thanks alot! [[alternative HTML version deleted]] __ R-help@r-project.o

Re: [R] Organizations where IT has approved the use of R software

2012-04-12 Thread David Smith
It's hard to respond without making it seem like an advertisement for Revolution Analytics, but helping companies and government organizations standardize on R (specifically, Revolution R) for data analysis is something we specialize in. The (partial) list of our customers using Revolution R at ht

Re: [R] Multivariate Multilevel Model: is R the right software for this problem

2012-04-12 Thread Bert Gunter
Wrong list. Post to R-sig-mixed-models -- Bert On Thu, Apr 12, 2012 at 12:34 PM, Eiko Fried wrote: > Very interesting book! > However, it doesn't cover multivariate models (I have 9 moderately > correlated, categorical dependent variables). > > Again, I'm trying to find out whether 5 time-varyin

Re: [R] Multivariate Multilevel Model: is R the right software for this problem

2012-04-12 Thread Eiko Fried
Very interesting book! However, it doesn't cover multivariate models (I have 9 moderately correlated, categorical dependent variables). Again, I'm trying to find out whether 5 time-varying variables (dichotomous; five different life events "yes"/"no"; subjects can have several life events at the s

Re: [R] Help with vectorization

2012-04-12 Thread R. Michael Weylandt
Perhaps ?outer -- well, not outer directly, but a multivariate outer -- I keep this one around for personal use: `mouter` <- function(..., FUN = "*"){ dotArgs <- list(...) FUN <- match.fun(FUN) if(length(dotArgs) == 1L) return(unlist(dotArgs)) if (length(dotArgs) == 2L)

Re: [R] Organizations where IT has approved the use of R software

2012-04-12 Thread R. Michael Weylandt
Slightly on topic, just yesterday, the CFPB announced they'll be using R in their work: http://blog.revolutionanalytics.com/applications/ Depending on the scale of your organization, it may not be the open-source nature that's quite the problem of the "IT Gang" but rather the support (or lack ther

Re: [R] number of warnings

2012-04-12 Thread R. Michael Weylandt
Just a joke -- since you post through Nabble instead of being a list subscriber, the vast majority of us didn't see your original post and instead only saw your "cry for help" Michael On Thu, Apr 12, 2012 at 10:08 AM, helin_susam wrote: > Sorry, I did not understand. What does it mean " call 999

Re: [R] Simple Problem: Plotting mathematical functions

2012-04-12 Thread Yellow
Hi, At the moment I am studying R at school. But I found this site very useful to explain the plot functions to me: http://www.harding.edu/fmccown/r/ Maybe that can help you too? -- View this message in context: http://r.789695.n4.nabble.com/Simple-Problem-Plotting-mathematical-functions

Re: [R] Applying a function to categorized data?

2012-04-12 Thread steven mosher
Welcome to R and the list. Others may suggest books ( Nutshell was my first ) but first there are some things that will help you both in programming and getting help on the list. You should post executable code in your question. So, build a toy example of the data.frame you have and show what

[R] Simple Problem: Plotting mathematical functions

2012-04-12 Thread Aye
Hey there, I want to plot 5 parabola functions, which happen to be f(x) = 0.25x² + 6,47x -32.6 g(x)=0.99x² -6x -195 j(x)= 0.77x² +14x -495 k(x)=0.001x² + 65x -785 l(x) = 0.9x² -2x -636 in the same graph. Sadly I even do not really understand how to plot just one graph

[R] Extended beta-binomial model in R

2012-04-12 Thread Henrik Hermansson
Dear all, I have been searching far and wide for a solution to the problem of negative intracluster correlation in the case of a binomial response variable (also known as under-dispersion). Prentice (1986) (http://www.jstor.org/stable/2289219) developed an extension of the beta-binomial model whic

Re: [R] Survreg output - interpretation

2012-04-12 Thread mariaeugeniau
Dear Terry  here is the survreg line from which I understand that "gender" is significant survreg(formula = Surv(dias, status) ~ trat * sexo * rep, dist = "weibull")                    Value      Std. Error       z        p sexom            -0.2187

Re: [R] number of warnings

2012-04-12 Thread helin_susam
Sorry, I did not understand. What does it mean " call 999" ? -- View this message in context: http://r.789695.n4.nabble.com/number-of-warnings-tp4550325p4551999.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org maili

Re: [R] quadratic model with plateau

2012-04-12 Thread help ly
Thanks to all for your help! That works! Orange On Sat, Apr 7, 2012 at 7:25 PM, Gabor Grothendieck wrote: > Yes, I had fixed that on my end but didn't notice I had copied the old > version. I think its obvious enough that anyone will fix it > themselves. Regards. > > On Sat, Apr 7, 2012 at 7:

[R] Help with vectorization

2012-04-12 Thread Filoche
Hi every one. I have a exponential function (3 fitting parameters) that I would like to use to produce data (6 series) without having to use a loop. Here wl = seq(300,500,1) k1 = c(1.2e-6, 4.9e-6, 9.6e-6, 2.7e-10, 6.7e-8, 7.44e-6) k2 = c(726, 352, 128, 5232, 1538, 128) k3 = c(-176, -224, -257, 88

[R] Organizations where IT has approved the use of R software

2012-04-12 Thread lynnland
Hi Gang, I realize this post is not directly related to programing issues with R, however, it appears this may be the best place to ask my question. I am putting forward a request that R be considered "approved" software in my organization. Never an easy task, this is made much more difficult

Re: [R] number of warnings

2012-04-12 Thread helin_susam
This is my wrong, I am so sorry for this. I just wanted to ask something which I did not know. Thanks for answer. Regards Helin. -- View this message in context: http://r.789695.n4.nabble.com/number-of-warnings-tp4550325p4552240.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Problem with lmer and fixef

2012-04-12 Thread swertie
Thank you very much. I started R again and loaded less libraries and it worked! I didn't know about this problem, the next time, I'll check for this before looking a whole afternoon for alternative methods ;). -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-lmer-and-f

[R] How to automate creation of plots (create series of plots)

2012-04-12 Thread Magdalena A. Tkacz
Hi All. I have problem with generating series of plots. In detail: I have file of data which I insert into dataframe: data<-read.table("file.txt", header=TRUE, sep=" ") Data in this file are prepared in such a way, that the header of each column has a value of one of examined parameter - somethi

[R] Pointwise Mutual Information

2012-04-12 Thread pl.r...@gmail.com
Hi, I want to calculate pointwise mutual information between "label" 2-gram, and words in my corpus "1-gram". Any suggestions as to how to go about it? l =label w = word C = reference collection I want to calculate following: p(w,l| C) p(w| C) p(l | C) -- View this message in context: htt

Re: [R] Help in creating a matrix

2012-04-12 Thread arunkumar1111
The formula is created sepearately and data is created for the formula and then use the modelling lm - Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Help-in-creating-a-matrix-tp4551532p4551967.html Sent from the R help mailing list archive at N

[R] Applying a function to categorized data?

2012-04-12 Thread Robert Latest
Hi all, I'm just getting started in R. My problem is the following: I have a data frame (v1) with lots of production data measurements. Each row contains a single measurement ('ARI_MIT') with a timestamp. I want to "lump" the data by months with their mean and standard deviation. I have already

Re: [R] How insert data to a column in existing csv file?

2012-04-12 Thread Yellow
Hi everyone, I read your messages and I tried some things out. The Data2 is filled with NA. So what I did was: NameFile.csv$Data2[is.na(NameFile.csv$Data2)] = log2Values And now it worked. :) Seems like I needed to replace it, and not only write it. Thanks. -- View this message in con

Re: [R] scatter3d: problem with spheres-color

2012-04-12 Thread John Fox
Dear René, I've confirmed that the spheres aren't coloured correctly on my Ubuntu system (the first colour is used for all of the spheres), and I know that this works right on Windows, as you mentioned. I'm curious to try it on my Mac, but don't have that handy at the moment. I also looked at

Re: [R] Using dcast with multiple functions to aggregate

2012-04-12 Thread Ista Zahn
Hi Jokel, On Thu, Apr 12, 2012 at 7:57 AM, Jokel Meyer wrote: > Dear R communitiy, > > I am trying to use multiple functions for aggregation within a function > call for dcast. However this seems to result in an error. Also I have not > managed to make dcast() work with fun.aggregate=sd. Please f

[R] writing spdiags function for R

2012-04-12 Thread Moreno I. Coco
Dear R-list, I am in the process of translating a long function written in Matlab into R (mainly because I am a big of fan of R, and folks will not have to pay to use it :). In the translation of this function I got stack because they use spdiags, which, as far as I can tell it is not available i

Re: [R] Reading SPSS: underlying numerical codes

2012-04-12 Thread Ista Zahn
Hi Marion, I don't have access to SPSS, so it would be hard for me to figure this out for you. I would think that string variables would be imported as strings or factors even when use.value.labels is true, but can't verify that. Good luck, Ista On Thu, Apr 12, 2012 at 7:59 AM, Marion Wenty wro

Re: [R] strsplit help

2012-04-12 Thread Jean V Adams
Alison, You've got two geneids with two periods (instead of just one period). gene.list <- strsplit(as.character(Rumino_Reps_agreeWalign$geneid),"\\.") Rumino_Reps_agreeWalign[sapply(gene.list, length)!=2, ] geneid count_Conser count_NonCons count_ConsSubst count_NCSubst 74

Re: [R] scatter3d: problem with spheres-color

2012-04-12 Thread Steve_Friedman
I do something similar my script is structured as follows: perhaps it will help library(car) library(rgl) library(mgcv) scatter3d(MADep2009 ~ MADwet2009 + MedAD2009 | as.factor(VegClass), data = SFCN, sphere.size=1.5, surface=FALSE, parallel=FALSE, elliposiod=TRUE, surface.col=c("green", "red", "

Re: [R] selective labels display on histogram

2012-04-12 Thread Richard M. Heiberger
Is this what you mean? x <- rnorm(12) histogram(x) histogram(x, scales=list(x=list(at=c(-1, 1), labels=c("minus one", "one" On Thu, Apr 12, 2012 at 9:28 AM, carol white wrote: > Hello, > Is it possible to selectively display labels on a histogram? > > Thanks > > Carol > >[[alterna

Re: [R] pyramid.plot in plotrix, axis labelling

2012-04-12 Thread Richard M. Heiberger
Gavin, Thank you for this example. I would use the as.pyramidLikert function in the HH package. The resulting plot is a standard lattice plot, so any fine tuning uses that standard lattice features. Rich > ## install.packages("HH") ## if necessary > library(HH) > mydata <- cbind(mpop,fpop)[10

Re: [R] convex nonnegative basis vectors in nullspace of matrix

2012-04-12 Thread capy_bara
Hi the solution with linear programming works very well! Even if I take more 'realistic' matrices with dimensions of about 25x60, the calculation of the basis goes well (if I increase the number of iterations to 1000). Meanwhile I also found an algorithm for an exact calculation of the extreme ray

[R] scatter3d: problem with spheres-color

2012-04-12 Thread René Mayer
Dear List, I don't get scatter3d to color the sheres according to the '|' argument. library(car) scatter3d(prestige ~ income + education|type, data=Prestige) The spheres on my screen are all colored the same and they are not conditional on Prestige$type. On the other hand: Fit3d and Ellipse3d ar

Re: [R] selective labels display on histogram

2012-04-12 Thread Petr PIKAL
Hi > > No, data labels on the histogram bars. labels = T in hist displays all data labels. You could find it probably quicker in documentation. Plotting command usually creates (invisibly) the object which can be saved and changed. h<-hist(x) h is list which you can use or modify for insta

Re: [R] How insert data to a column in existing csv file?

2012-04-12 Thread jim holtman
I would suggest using the XLConnect package so that you can read/write the Excel files directly. You can read in the files to a dataframe, make your transformations and then write the result back out to the Excel file. On Thu, Apr 12, 2012 at 11:29 AM, Nordlund, Dan (DSHS/RDA) wrote: >> -Ori

Re: [R] How insert data to a column in existing csv file?

2012-04-12 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Yellow > Sent: Thursday, April 12, 2012 2:18 AM > To: r-help@r-project.org > Subject: [R] How insert data to a column in existing csv file? > > I was working with some excel file

[R] correlation matrix between data from different files

2012-04-12 Thread jeff6868
Dear users, I'm quite a new french R-user, and I have a problem about doing a correlation matrix. I have temperature data for each weather station of my study area and for each year (for example, a data file for the weather station N°1 for the year 2009, a data file for the N°2 for the year 2010,

Re: [R] selective labels display on histogram

2012-04-12 Thread carol white
No, data labels on the histogram bars. labels = T in hist displays all data labels. thanks From: Petr PIKAL Cc: "r-h...@stat.math.ethz.ch" Sent: Thursday, April 12, 2012 4:03 PM Subject: Re: [R] selective labels display on histogram Hi > > Hello, > Is i

Re: [R] Remove superscripts from HTML objects

2012-04-12 Thread mlell08
Hi, h <- "CataDog" sub("","",h) see http://en.wikibooks.org/wiki/R_Programming/Text_Processing for more information. Regards! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

Re: [R] number of warnings

2012-04-12 Thread Uwe Ligges
This is the R-help mailig list, not Nabble, hence quote the original message! Anyway, the answer is: See ?options and its argument "nwarnings". Uwe ligges On 12.04.2012 14:49, helin_susam wrote: Any help ? -- View this message in context: http://r.789695.n4.nabble.com/number-of-warnings-

Re: [R] Support for R in highlight.js

2012-04-12 Thread Yihui Xie
There are numerous JS libraries for syntax highlighting. I have never tried highlight.js yet, but I wrote something for SyntaxHighlighter which might be easily translated to highlight.js: http://yihui.name/en/2010/09/syntaxhighlighter-brush-for-the-r-language/ Regards, Yihui -- Yihui Xie Phone: 5

Re: [R] Problem with lmer and fixef

2012-04-12 Thread Ben Bolker
swertie voila.fr> writes: > I am trying to do contrasts after applying a binomial mixed effect model > with the function lmer. I have to extract the fix effect values, but as I > write fixef(model), I get this error message: > > Error in UseMethod("fixef") : > no method for 'fixef' with objec

Re: [R] R error message

2012-04-12 Thread mlell08
Hi, > The code I have used is > >> summary(prefdata) >> prefdata[prefdata>5]=NA >> summary(prefdata) >> prefdata2=as.matrix(prefdata[3:22]) >> stats=paf(prefdata2) > [1] "One of your variables is a constant. Constants are disallowed as > part of could you provide some data / sample data you used fo

Re: [R] selective labels display on histogram

2012-04-12 Thread Petr PIKAL
Hi > > Hello, > Is it possible to selectively display labels on a histogram? What labels? Like that? x<-rnorm(1) hist(x) hist(x, axes=F, xlab="bla", ylab="ble", main="bleble") axis(1, at=c(-4, -1, 1, 4)) Regards Petr > > Thanks > > Carol > >[[alternative HTML version deleted]] >

Re: [R] number of warnings

2012-04-12 Thread Petr PIKAL
Hi > > Any help ? Call 999 Regards Petr > > -- > View this message in context: http://r.789695.n4.nabble.com/number-of- > warnings-tp4550325p4551760.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailin

[R] Curve fitting, probably splines

2012-04-12 Thread Michael Haenlein
Dear all, This is probably more related to statistics than to [R] but I hope someone can give me an idea how to solve it nevertheless: Assume I have a variable y that is a function of x: y=f(x). I know the average value of y for different intervals of x. For example, I know that in the interval[0

[R] Problem with lmer and fixef

2012-04-12 Thread swertie
Hello, I am trying to do contrasts after applying a binomial mixed effect model with the function lmer. I have to extract the fix effect values, but as I write fixef(model), I get this error message: Error in UseMethod("fixef") : no method for 'fixef' with objects of class "mer" Has anybody s

Re: [R] number of warnings

2012-04-12 Thread helin_susam
Any help ? -- View this message in context: http://r.789695.n4.nabble.com/number-of-warnings-tp4550325p4551760.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-he

[R] selective labels display on histogram

2012-04-12 Thread carol white
Hello, Is it possible to selectively display labels on a histogram? Thanks Carol [[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

Re: [R] Survreg output - interpretation

2012-04-12 Thread Terry Therneau
--- begin included message --- Hello R users, I am analizing survival data (mostly uncensored) and want to extract the most out of it. Since I have more than one factor, I?ve read that the survival regression can help to test the interactions between factors, and then decide how to do the comparis

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread Uwe Ligges
On 12.04.2012 13:53, Uwe Ligges wrote: On 12.04.2012 13:49, John S wrote: Thanks Berend for your answer! I read the documentation but I don’t understand filename ="Rplot%03d.tif" ? Do you mind sending me what you tried? This is a bug in R. I'll take a look. I think I have a fix, will

Re: [R] Encoding of Sweave file error message

2012-04-12 Thread Duncan Mackay
Hi Rainer Thanks for an alternative. For the record I tried your latex solution on my Windows 7 \usepackage[utf8x]{inputenc} but it failed on the Alt-248 Regards Duncan At 19:13 12/04/2012, you wrote: I also had the same problem. Being on Linux, I prefer Walmes' command line method but

Re: [R] Michaelson-Morley Speed of Light Data

2012-04-12 Thread Michael Friendly
The same data, with the proper citations to Michelson(1882) and Stigler(1977) are contained in the HistData package as data(Michelson) See library(HistData) example(Michelson) On 4/11/2012 7:42 AM, Duncan Murdoch wrote: On 12-04-11 12:43 AM, Křištof Želechovski wrote: http://finzi.psych.upenn

Re: [R] Encoding of Sweave file error message

2012-04-12 Thread Duncan Mackay
Hi Duncan Thank you for the tips I tried \usepackage[latin1]{inputenc} but it still bailed up. tried showNonASCII on the file with the ° typed as Alt-248 (used to doing as DOS value) becomes Alt-176 in ASCII % 1° line resulted in 483: % 1 line The showNonASCII is a nifty function Duncan

Re: [R] Centering (e.g. on prcomp)

2012-04-12 Thread Jessica Streicher
Ah.. forget it, something must have gone wrong while i was testing (probably messed up some apply()). Seems you can just subtract the returned means - i hope at least. Am 12.04.2012 um 14:30 schrieb Jessica Streicher: > Hi! > > I'm doing a PCA on some testdata (only 2 features) currently to s

Re: [R] Encoding of Sweave file error message

2012-04-12 Thread Duncan Murdoch
On 12-04-12 12:13 AM, Duncan Mackay wrote: At 12:03 12/04/2012, you wrote: I had the same problem! So, as I'm a linux user, I prefer use linux terminal. On terminal I type this to compile R CMD Sweave --encoding=utf-8 myfile.Rnw and the compilation is successful. Try to set the encoding opti

[R] pyramid.plot in plotrix, axis labelling

2012-04-12 Thread Gavin Rudge
Hi, I've been looking at ways to make pyramid plots in R. I like the pyramid.plot method in plotrix as it seems the simplest to use and building them in ggplot looks a bit more code intensive than I'd like, being as I'm new to R. This package does pretty much what I need it to do, however I ca

[R] Multivariate multilevel mixed effects model: interaction

2012-04-12 Thread Eiko Fried
Hello. I am running a multivariate multilevel mixed effects model, and am trying to understand what the interaction term tells me. A very simplified version of the model looks like this: model <- lmer (phq ~ -1 + as.factor(index_phq) * Neuro + ( -1 + as.factor(index_phq)|UserID), data=data) The

Re: [R] Help in creating a matrix

2012-04-12 Thread S Ellison
>I have dataset with n variables, say n =3 x y z >the formula should be form = x+y+z+x*x +x*y+x*z +y*y + y*z+z*z >my code has to for loop >Is there any way to reduce two loops > for (i in 1:n) > { > for (j in i:n) > { >dat= cbind(dat,dat[,i]*dat[,j]) > } > } Yes; use

  1   2   >