[R] Antwort: Re: Accessing an object using a string

2016-08-15 Thread G . Maubach
Hi Greg and all others who replied to my question, many thanks for all your answers and help. Currently I store all my objects in .GlobalEnv = Workspace. I am not yet familiar working with different environments nor did I see that this would be necessary for my analysis. Could you explain why

Re: [R] Need help with use of ROCK algorithm in R for binary data

2016-08-15 Thread PIKAL Petr
Hi see in line > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Matej > Zuzčák > Sent: Monday, August 15, 2016 11:23 AM > To: r-help@r-project.org > Subject: [R] Need help with use of ROCK algorithm in R for binary data > > Dear list members, > > I ha

[R] Need help with use of ROCK algorithm in R for binary data

2016-08-15 Thread Matej Zuzčák
Dear list members, I have one appeal for you. I need use ROCK (RockCluster) algorithm for binary data in R. My binary data looks this: |objects cat1 cat2 cat3 cat4 ...A TRUE FALSE FALSE FALSE B TRUE FALSE TRUE FALSE C TRUE FALSE FALSE FALSE D FALSE TRUE TRUE TRUE E TRUE TRUE TRUE TRUE F TRUE FA

Re: [R] Accessing an object using a string

2016-08-15 Thread Greg Snow
Hmm, names appears to be both primitive and generic, since when I look at the function definition (3.3.0) I see: > names function (x) .Primitive("names") This is what I was referring to as the primitive. I had originally intended to look at the code for names to see how it accessed the attribut

Re: [R] Accessing an object using a string

2016-08-15 Thread William Dunlap via R-help
'names' is an S3-generic function. E.g., in R-3.3.0: > names.unnamed <- function(x) sprintf("#%0*d", ceiling(log10(length(x))), seq_along(x)) > u <- structure(letters, class="unnamed") > names(u) [1] "#01" "#02" "#03" "#04" "#05" "#06" "#07" [8] "#08" "#09" "#10" "#11" "#12" "#13" "#1

Re: [R] Accessing an object using a string

2016-08-15 Thread Greg Snow
The names function is a primitive, which means that if it does not already do what you want, it is generally not going to be easy to coerce it to do it. However, the names of an object are generally stored as an attribute of that object, which can be accessed using the attr or attributes functions

Re: [R] Antwort: Accessing an object using a string (SOLVED)

2016-08-15 Thread Bert Gunter
While I generally agree with Jeff's caution and advice about the use of get(), I have also often struggled with designing suitable interfaces for loading and saving files. So I just wanted to add that the interactive file.choose() function can be very helpful in this context if you aren't already a

Re: [R] Antwort: Accessing an object using a string (SOLVED)

2016-08-15 Thread Jeff Newmiller
Use of "get" usually means you are doing something wrong in setting up your approach to a problem. That is, if you design your interface to your functions to be overly general, it will become full of surprises later. If in fact the data you are interested in referring to is a column in a data

Re: [R] glmer and glht

2016-08-15 Thread Bert Gunter
Extensive references are given in the package. I suggest that you consult them. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Aug 15, 2016

[R] glmer and glht

2016-08-15 Thread Sibylle Stöckli
Dear R colleagues, The effect of habitat type on bee species number was tested using a glmer model with habitat as fixed effect (5 habitat types) and site and time as random terms. The idea was now to conduct post hoc tests with glht (package "multcomp") for pairwise comparisons. The matrix was

Re: [R] R Studio: Run script upon saving or exiting

2016-08-15 Thread MacQueen, Don
See ?.Last for information on how to cause something to happen when R exits. (whether R Studio overrides this I don't know) -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 8/13/16, 1:02 PM, "R-help on behalf of Jan Kac

Re: [R] Error while fitting gumbel copula

2016-08-15 Thread Isaudin Ismail
Dear Dr. Martin, I'm glad that you replied to my queries. As advised, I have prepared the following: library(copula) # 5 series of data, A, B, C, D and E A <- c(0.849420849, 0.900652985, 0.97144217, 0.817888428, 0.877901578, 1.070040669, 0.889742431, 0.87588968, 0.853541938, 0.84866468

[R] Antwort: Accessing an object using a string (SOLVED)

2016-08-15 Thread G . Maubach
Hi All, I found the function get() which returns an object. My whole function looks like this: -- cut -- #--- # Module: t_load_dataset.R # Author: Georg Maubach # Date : 2016-08-15 # Update

Re: [R] add segments from other data ggplot

2016-08-15 Thread PIKAL Petr
Thanks Ron. Your explanation is clear, at least to me. I did not use the approach of start with plain ggplot call following some geom calls before. However I must say I finally turned back to standard graphics which seems to me easier in this case and I can easily add other values without many

Re: [R] add segments from other data ggplot

2016-08-15 Thread Crump, Ron
Dear Petr, In your code: p<-ggplot(ram.ag, aes(Raman, XRD, colour=mereni)) p+geom_point(size=5)+geom_segment(data=dat, aes(x=Ramanpuv, y=XRDpuv,xend=Ramannov, yend=XRDnov), arrow = arrow(length = unit(1,"cm"))) you have set mereni to control the colour aesthetic in the call to ggplot. This will

[R] Accessing an object using a string

2016-08-15 Thread G . Maubach
Hi All, I would like to access an object using a sting. # Create example dataset var1 <- c(1, 2, 3) var2 <- c(4, 5, 6) data1 <- data.frame(var1, var2) var3 <- c(7, 8, 9) var4 <- c(10, 11, 12) data2 <- data.frame(var3, var4) save(file = "c:/temp/test.RData", list = c("data1", "data2")) # Define

[R] add segments from other data ggplot

2016-08-15 Thread PIKAL Petr
Dear all I want to put arrows from other data to ggplot and get strange behaviour. The code: p<-ggplot(ram.ag, aes(Raman, XRD, colour=mereni)) p+geom_point(size=5)+geom_segment(data=dat, aes(x=Ramanpuv, y=XRDpuv,xend=Ramannov, yend=XRDnov), arrow = arrow(length = unit(1,"cm"))) results to foll