Re: [R] Comparing Latin characters with and without accents?

2014-12-14 Thread Spencer Graves
Hello, All: What do people do to strip accents from latin characters, returning vanilla ASCII? For example, I want to convert ‘Raúl’ to “Raul”. Milan (below) suggested 'iconv(x, “", "ASCII//TRANSLIT”)’. This worked under Windows but failed on Linux and Mac. It’s p

Re: [R] extract objects from R output

2014-12-14 Thread David Winsemius
PLEASE DO NOT POST IN HTML: > On Dec 14, 2014, at 12:30 PM, Kruti Pandya wrote: > > I am new to R and using this package BoolNet. I wanted to extract the > boolean transition functions resulting from the output of > generateRandomNKNetwork function. I am able to extract individual function > us

[R] extract objects from R output

2014-12-14 Thread Kruti Pandya
I am new to R and using this package BoolNet. I wanted to extract the boolean transition functions resulting from the output of generateRandomNKNetwork function. I am able to extract individual function using net$interactions$Gene1$expression,net$interactions$Gene2$expression . But it gives me

[R] Using PBMROC software in R

2014-12-14 Thread Vokey, John
Fellow useRs, I am trying to install and call the PBMROC software (from the Metz-ROC Software Downloads: http://metz-roc.uchicago.edu) without much success, even though it was designed to be flexible enough to call from R or Matlab. Has anyone managed to get the PBMROC software to work within

[R] ASA Stat. Computing & Stat. Graphics Student Paper Competition 2015

2014-12-14 Thread Munjal, Aarti
Statistical Computing and Statistical Graphics Sections American Statistical Association Student Paper Competition 2015 The Statistical Computing and Statistical Graphics Sections of the ASA are co-sponsoring a student paper competition on the topics of Statistical Computing and Statistical Graph

Re: [R] create matrices with constraint

2014-12-14 Thread John McKown
On Sun, Dec 14, 2014 at 9:30 AM, Gerrit Draisma wrote: > Ha John, > Sorry I did not follow the discussion but what > about > combn(1:28,4) > ? > Gerrit. ​Very nice! Thanks. The form needed by the OP would be t(combn(1:28,4)) to swap rows & columns. I'm cross posting this to the r-help so tha

Re: [R] Two-tailed exact binomial test with binom.test and sum(dbinom(...))

2014-12-14 Thread peter dalgaard
> On 14 Dec 2014, at 13:54 , Stefan Evert wrote: > > >> (3) What is people's view on computing the two-tailed test like this, >> which leads to an ns result unlike binom.test? >> 2*sum(dbinom(51:235, 235, 1/6)) # 0.05308849 > > This is a popular approximation (which I also use most of the tim

Re: [R] Checking if a logical variable exists

2014-12-14 Thread Steven Yen
Thanks. This worked!! :) Fisher <- ifelse(!("Fisher" %in% names(obj$spec)), FALSE, obj$spec$Fisher) Steven At 08:43 AM 12/14/2014, Ben Tupper wrote: Hi, Does this work for you? It simply tests if the name Fisher is found among the names of the elements of spec. obj = list(spec = list) Fish

Re: [R] Checking if a logical variable exists

2014-12-14 Thread Ben Tupper
Hi, Does this work for you? It simply tests if the name Fisher is found among the names of the elements of spec. obj = list(spec = list) Fisher <- ifelse(!("Fisher" %in% names(obj$spec)), FALSE, obj$spec$Fisher) Cheers, Ben On Dec 14, 2014, at 8:07 AM, Steven Yen wrote: > My obj does not al

Re: [R] Checking if a logical variable exists

2014-12-14 Thread Duncan Murdoch
On 14/12/2014, 8:07 AM, Steven Yen wrote: > My obj does not always come with a logical variable defined. So I do > > my.foo <- function(obj,df,digits=5){ > if (!is.na("obj$spec$Fisher")) Fisher<-obj$spec$Fisher > ... > } > > This works when "Fisher" is defined in/passed from obj. When it is > no

[R] Checking if a logical variable exists

2014-12-14 Thread Steven Yen
My obj does not always come with a logical variable defined. So I do my.foo <- function(obj,df,digits=5){ if (!is.na("obj$spec$Fisher")) Fisher<-obj$spec$Fisher ... } This works when "Fisher" is defined in/passed from obj. When it is not, I get error: Error in (!is.na("obj$spec$Fisher")) & Fi

Re: [R] Two-tailed exact binomial test with binom.test and sum(dbinom(...))

2014-12-14 Thread Stefan Evert
If your null hypothesis is that the probability of a success is 0.6, i.e. H0: p=0.6, then those > (a) Let's also assume we have an H1 that there are more than 6 > successes > > (b) Now let's assume we have an H1 that there are fewer than 6 > successes > > (1). My understanding would be that, i

Re: [R] abline function : plot.new has not been called yet

2014-12-14 Thread Frederic Ntirenganya
Thanks Jeff for the Help. it works correctly. Regards, Frederic. Frederic Ntirenganya Maseno University, African Maths Initiative, Kenya. Mobile:(+254)718492836 Email: fr...@aims.ac.za https://sites.google.com/a/aims.ac.za/fredo/ On Sun, Dec 14, 2014 at 11:13 AM, Jeff Newmiller wrote: > > The a

Re: [R] abline function : plot.new has not been called yet

2014-12-14 Thread Jeff Newmiller
The abline function is part of base graphics (read the help ?abline... it is part of the "graphics" package). The xyplot function is part of the lattice package... a clone of the original "trellis" package from the S software. The two approaches to graphics don't play well together. Once you k