Re: [R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread Patrick Connolly
I can't reproduce it either using x11 or pdf devices. I'm curious to know just how you manage to get that result. On Mon, 25-Aug-2014 at 10:15AM -0400, Sarah Goslee wrote: |> I can't reproduce this on R 3.1.0 on linux or R 3.1.1 on Mac, using |> the default graphics device on each. |> |> What

Re: [R] How to do t.test to rows of a dataframe using apply family function?

2014-08-25 Thread PIKAL Petr
Hi If your function works for you why to bother with apply? If it does not give you required results, please post some data and show us what is expected. I would remove unlist from your function and declare list for storing data, which seems to me more natural for storing results. t.test.list=

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread Jeff Newmiller
I would refer to base::somename or stat::somename if necessary, and I never use attach, get or assign. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread PO SU
First, sorry for my pool english expression which make you misunderstanding of my original purpose. Sometimes, suppose  a object in both stats and base, then i type the object name, then after R search the search() list, R will use the object in stats, is it right?( I just suppose, stats can be

[R] What is RVM t test? Is it possible to use it in R?

2014-08-25 Thread my1stbox
Hi All, What is RVM t test? Is it possible to use it in R? And How? Bests, Allen Chiu 2014-08-26 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gu

[R] panel.cor NA's

2014-08-25 Thread Emma Gerald Boyer
I am running the code below and receiving NA's in many of the boxes that are supposed to contain r values. Could anyone tell me what that means? and possibly how to fix it? Thanks, EGB panel.cor <- function(x, y, digits=2, prefix="", cex.cor, ...) { usr <- par("usr"); on.exit(par(usr)) par(

[R] How to do t.test to rows of a dataframe using apply family function?

2014-08-25 Thread my1stbox
Hi All, How to do t.test to rows (with two levels, or in other words, groups of samples) of a dataframe using apply family function? I have done that using function and loops. And my overall purpose is to calculate DE genes from two groups of miRNA microarray samples. And I know limma can do th

Re: [R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread Dario Strbenac
Thanks for drawing my attention to the zero.line argument. I had only checked the help page for par. -- Dario Strbenac PhD Student University of Sydney Camperdown NSW 2050 Australia __ R-help@r-project.org mailing lis

Re: [R] Display warning only once in session

2014-08-25 Thread Grant Rettke
Is local preferred to prevent *any* access to the internal environment of the returned function? How is it different than this? myFunc <- function() { notWarnedYet <- TRUE function(x) { if (notWarnedYet) { warning("myFunc is funky") notWarnedYet <<- FALSE #

Re: [R] Display warning only once in session

2014-08-25 Thread William Dunlap
> Is local preferred to prevent *any* access to the internal environment > of the returned function? You can gain access to the environment of the function by using environment(myFunc), with either local() or your suggestion of making a factory function and calling it. > How is it different than

Re: [R] Preventing loading of user packages

2014-08-25 Thread Brian Diggs
On 8/25/2014 2:08 PM, Jonathon Love wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 hey, i was able to solve the problem by explicitly putting R_LIBS_USER='' in the /etc/Renviron file (it isn't enough simply to comment the entry out, because it has a default value that magically comes

Re: [R] Display warning only once in session

2014-08-25 Thread William Dunlap
You could use local() to associate a state variable with your function: myFunc <- local({ notWarnedYet <- TRUE function(x) { if (notWarnedYet) { warning("myFunc is funky") notWarnedYet <<- FALSE # note use of <<- } sqrt

Re: [R] Preventing loading of user packages

2014-08-25 Thread Jonathon Love
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 hey, i was able to solve the problem by explicitly putting R_LIBS_USER='' in the /etc/Renviron file (it isn't enough simply to comment the entry out, because it has a default value that magically comes from somewhere else) cheers On 25/08/2014

[R] Display warning only once in session

2014-08-25 Thread Berry Boessenkool
Hi, I'm writing a function that gives a warning in a certain scenario. Reading this once per R session will be enough. i.e. it's not necessary to be shown in subsequent function calls. What's the best way to implement this? Some package-specific option? Where would I find good information on tha

Re: [R] Filled vector contours

2014-08-25 Thread Jan Tosovsky
On 2014-08-25 David Winsemius wrote: > On 2014-08-24 Jan Tosovsky wrote: > > On 2014-08-24 Prof Brian Ripley wrote: > > > On 24/08/2014 08:51, Jan Tosovsky wrote: > > > > > > > > I am trying to create vector output (SVG) of filled contours. > > > > > > > > I've found two approaches so far: > > > >

Re: [R] Preventing loading of user packages

2014-08-25 Thread David Winsemius
On Aug 25, 2014, at 7:11 AM, Ista Zahn wrote: > On Mon, Aug 25, 2014 at 5:58 AM, Jonathon Love wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA512 >> >> Hi, >> >> I'm trying to prevent the loading of packages from the 'personal >> library' > > Of behalf of the users you are about to

Re: [R] How to plot multiple density plot and scatter plot together

2014-08-25 Thread David L Carlson
Assuming the y-axis is different for the scatter line segment plot, you probably want to use twoord.plot() in package plotrix to construct overlapping plots using different ordinate (y-axis) scales. For examples see http://rgm.ogalab.net/RGM/R_image_list?package=plotrix&rd_name=twoord.plot&data_

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread MacQueen, Don
Put simply, .GlobalEnvstores objects you create package:base contains functions and objects provided by R itself You don¹t need to use .GlobalEnv$a to use the variable named a. Just is ³a² by itself. a <- 4 b <- 2*a print(a) print(b) Not necessary to use print(.GlobalEnv$a) S

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread John McKown
On Mon, Aug 25, 2014 at 1:08 PM, PO SU wrote: > > Tks for all your details, after your introduction, i really read the ?attach > carefully, and i now understand the argument "pos" now, but in my opnion, the > details in the function "attach" may do the as.environment(pos) for me. > And i also un

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread PO SU
Tks for all your details, after your introduction, i really read the ?attach carefully, and i now understand the argument "pos" now, but in my opnion, the details in the function "attach" may do the as.environment(pos) for me.  And i also understand that, "attach" will copy the attached envir,an

Re: [R] recording age into different variables

2014-08-25 Thread Ista Zahn
Hi Andrew, See ?cut and ?table, e.g., table(cut(Age, c(0, 10, 20, 30), include.lowest=TRUE)) should do it. Best, Ista On Mon, Aug 25, 2014 at 11:34 AM, Andrew Kabala wrote: > Hi, > I am new to R, I would like to know how i can summarize age data into > different categories i.e. > Age > 14 > 1

Re: [R] recording age into different variables

2014-08-25 Thread Bert Gunter
Before posting further: 1. Read the posting guide linked to at the bottom of this message. In particular note: no HTML,please. 2. Do your due diligence. Spend some time with an R tutorial to learn the basics -- we should not have to answer questions that with minimal effort you could answer for y

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread John McKown
On Mon, Aug 25, 2014 at 12:26 PM, John McKown wrote: > Please be very aware of the following, very confusing fact: > Referencing a variable can not have the expected results. > >> new_name <- new.env() >> attach(new_name) >> search() > [1] ".GlobalEnv""new_name" "tools:rstudio"

[R] recording age into different variables

2014-08-25 Thread Andrew Kabala
Hi, I am new to R, I would like to know how i can summarize age data into different categories i.e. Age 14 16 20 60 45 . . I would like to generate a summary for example showing the frequencies in each custom defined group 0-10 yrs 11-20 years 21-30 years 20 5 6 many tha

[R] How to plot multiple density plot and scatter plot together

2014-08-25 Thread കുഞ്ഞായി kunjaai
Dear all, I want to plot kernal density of two set of data (theses both data set have same shape) and I want to insert scatter line segment plot ( http://stackoverflow.com/questions/24931006/r-simple-scatter-plot-with-vertical-lines) on this same plot. I can make two density plot together(I have

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread John McKown
On Mon, Aug 25, 2014 at 11:19 AM, PO SU wrote: > As you know, in the search path, there is .GlobalEnv, package:stats and so > on, why do we need to convert the character "package:stats" to the stats > environment. > I mean, why don't let package:stats be a environment type object like > .GlobalEnv

Re: [R] Trace and inverse of big matrices

2014-08-25 Thread Martin Maechler
> Wagner Bonat > on Mon, 25 Aug 2014 10:31:41 +0200 writes: > I need to compute two equations related with trace and inverse of a around > 3 x 3 density matrices. The equations are > -trace( W_i %**% C) and -trace(W_i %**% C %*% W_j C) [I assume that 2nd eq is mi

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread PO SU
As you know, in the search path, there is .GlobalEnv, package:stats and so on, why do we need to convert the character "package:stats" to the stats environment. I mean, why don't let package:stats be a environment type object like .GlobalEnv,but let it be a string ? Hope you understand my meanin

Re: [R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread Martin Maechler
> William Dunlap > on Mon, 25 Aug 2014 08:01:39 -0700 writes: > Add zero.line=FALSE to the call to plot() to get rid of > the gray line. Thank you, Bill. > help(plot.density) should say something about it. > Bill Dunlap TIBCO Software wdunlap tibco.com But it do

Re: [R] rJAVA and JGR doesnot get installed,

2014-08-25 Thread Jeff Newmiller
"What could be the reason" might be that you don't have 64bit Java runtime installed. Either install that, or if you have 32bit Java runtime installed then you could try running the 32 bit version of R. --- Jeff Newmiller

Re: [R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread William Dunlap
Add zero.line=FALSE to the call to plot() to get rid of the gray line. help(plot.density) should say something about it. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Aug 25, 2014 at 5:00 AM, Dario Strbenac wrote: > Why is the bottom boundary plotted in a different colour to the other thr

[R] Help with lsmeans

2014-08-25 Thread Dan Dillon
Colleagues: I am running two regressions with lme4 and using lsmeans to digest the results, and lsmeans works fine with one regression but hangs with the other one--I'm not sure why, and I am hoping someone can help me debug. I am running R version 3.1.1 in the IPython notebook, and I've got lsmea

Re: [R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread Sarah Goslee
I can't reproduce this on R 3.1.0 on linux or R 3.1.1 on Mac, using the default graphics device on each. What graphics device are you using? If all else fails, you could use box() to draw over it. Sarah On Mon, Aug 25, 2014 at 8:00 AM, Dario Strbenac wrote: > Why is the bottom boundary plotted

Re: [R] Preventing loading of user packages

2014-08-25 Thread Ista Zahn
On Mon, Aug 25, 2014 at 5:58 AM, Jonathon Love wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Hi, > > I'm trying to prevent the loading of packages from the 'personal > library' Of behalf of the users you are about to cripple, please, do not do that! -Ista on an OS X machine. i.

[R] rJAVA and JGR doesnot get installed,

2014-08-25 Thread Girija Kalyani
Im very much new to R-studio. Can anyone answer this. I have installed many packages but this doesnot work. What could be the reason. I want to run Maxent through R Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: una

[R] Trace and inverse of big matrices

2014-08-25 Thread Wagner Bonat
I need to compute two equations related with trace and inverse of a around 3 x 3 density matrices. The equations are -trace( W_i %**% C) and -trace(W_i %**% C %*% W_j C) I know W_i, W_j and inverse of C. These equations are related with Pearson estimating functions. I am trying to use R a

[R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread Dario Strbenac
Why is the bottom boundary plotted in a different colour to the other three sides ? set.seed() data <- rpois(10, 2) plot(density(data), ann = FALSE, yaxs = 'i') # Grey bottom boundary. plot(density(data), ann = FALSE) # All boundaries are black. Ideally, there would be black lines on all fou

[R] Preventing loading of user packages

2014-08-25 Thread Jonathon Love
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, I'm trying to prevent the loading of packages from the 'personal library' on an OS X machine. i.e. the packages that are normally placed somewhere like: ~/Library/R/3.0/library There is a file in the R.framwork directory: /Versions/3.0/Resour

Re: [R] What the difference between .Golbalenv and package:base?

2014-08-25 Thread John McKown
On Mon, Aug 25, 2014 at 1:07 AM, PO SU wrote: > > > Dear rusers, > > As we know, there are a lot of environments in the search() path, such as > .Golbalenv and package:base . > And i can just use .Golbalenv$a ,.Golbalenv$b to use the virable, but i > must use as.envrionment("package:bas

Re: [R] bam (mgcv) not using the specified number of cores

2014-08-25 Thread Simon Wood
oops, I just realised that the fix referred to below is in mgcv 1.8-3 - not yet on CRAN. On 25/08/14 13:20, Simon Wood wrote: Hi Andrew, In some of the shots you sent then top was reporting several cores working. I think the problem here may be to do with the way bam is parallelized - at prese

Re: [R] bam (mgcv) not using the specified number of cores

2014-08-25 Thread Simon Wood
Hi Andrew, In some of the shots you sent then top was reporting several cores working. I think the problem here may be to do with the way bam is parallelized - at present only part of the computation is in parallel - the model matrix QR decomposition part. The smoothing parameter selection is

Re: [R] require() but for source()d files

2014-08-25 Thread Ivan Calandra
Thank you Henrik, that's exactly what I'm looking for! Ivan -- Ivan Calandra University of Franche-Comté Laboratoire Chrono-Environnement Bureau ATER -107L 16, Route de Gray 25030 Besançon Cedex, France ivan.calan...@univ-fcomte.fr +33 (0) 381 66 20 60 http://chrono-environnement.univ-fcomte.fr/s