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

2014-08-26 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.

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

2014-08-26 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

[R] VennDiagram

2014-08-26 Thread Jurgens de Bruin
Hi, I am new to R and dont use it very often so I would appreciate some help. I would like to create a VennDiagram based on the following, I have analyzed experimental results using different methods and captured the results of each analysis. I would like the VennDiagram to show the overlap in

Re: [R] VennDiagram

2014-08-26 Thread João Azevedo Patrício
Em 26-08-2014 09:30, Jurgens de Bruin escreveu: Hi, I am new to R and dont use it very often so I would appreciate some help. I would like to create a VennDiagram based on the following, I have analyzed experimental results using different methods and captured the results of each analysis. I

Re: [R] VennDiagram

2014-08-26 Thread Jurgens de Bruin
Hi,, Thanks for the link, I have tried that but it seems my data is in the wrong format for that to work. On 26 August 2014 10:35, João Azevedo Patrício joao.patri...@gmx.pt wrote: Em 26-08-2014 09:30, Jurgens de Bruin escreveu: Hi, I am new to R and dont use it very often so I would

[R] What would a typical miRNA microarray analysis workflow look like?

2014-08-26 Thread my1stbox
Hi all, What would a typical miRNA microarray analysis workflow look like? Say just a test group of 5 replicates from bladder cancer tumor and corresponding control group from normal tissue of the same patients. What could I do to make the analysis seems more sophisticated. I have done

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

2014-08-26 Thread PIKAL Petr
Hi Please reply also to rhelp, maybe others can offer better answer. Well, are you aware that by unlist you get all results as character values and not numbers? Personally I would use lapply and do.call on final result to get it as data frame. Here is example Some model list data

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

2014-08-26 Thread my1stbox
Thank you so much! Why do do.call(rbind,lapply(lll,rbind)) and rbind(lapply(lll,rbind)) act so differently? What is the tricky part of that? do.call(rbind,lapply(lll,rbind)) statistic parameter p.value conf.int estimate null.value alternative [1,] 2.775282 37.99977 0.008509272 Numeric,2

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

2014-08-26 Thread PIKAL Petr
Hi That is because do.call is one function and rbind another. For both functions you can find its help page and read: rbind vectors or matrices. These can be given as named arguments. Other R objects will be coerced as appropriate: see sections ‘Details’ and ‘Value’. The type of a matrix result

Re: [R] VennDiagram

2014-08-26 Thread David L Carlson
Assuming your sample data is called dta: table(dta$Results, dta$Analysis) A B C 1-5 1 1 0 20-50 1 0 0 4-7 0 0 1 8-9 0 1 1 David L. Carlson Department of Anthropology Texas AM University -Original Message- From: r-help-boun...@r-project.org

[R] package 'gradientForest' and 'extendedForest'

2014-08-26 Thread Kulupp
Dear experts, I have 5 environmental predictors and abundance data (300 samples, 60 species, transformation: log(x + min(x,x 0) and use the function 'gradientForest' to estimate (R�-weighted) predictor importance (regression trees). The resulting predictor importance in decreasing order is

[R] StackRaster problem

2014-08-26 Thread Guilherme Leite
Hi, This is the process I want to do: files - list.files(path=paste(system.file(package=dismo), '/ex', sep=''), pattern='grd', full.names=TRUE ) # The above finds all the files with extension grd in the # examples (ex) directory of the dismo package. You do not # need such a complex

[R] Weighted Mann-Whitney-Wilcoxon-Test

2014-08-26 Thread Alexander Sommer
On Tuesday, August 19, 2014 9:46 PM Thomas Lumley tlum...@uw.edu wrote: Is anyone aware of an(other) implementation in R? survey::svyranktest Oh, that easy. Thanks a lot. Actually, in my case the weights do not derive from some selection probabilities, but your test works anyway. For

[R] Plot survreg and intcox

2014-08-26 Thread Silong Liao
Dear R users, I'm trying to plot survival probability against time(in years) using survreg and intcox. Please can you help me with this problem? My code shows below:mod.reg1=survreg(s_new~type+sex+eye+preopiop+preopva,dist=weibull)summary(mod.reg1) Call:survreg(formula = s_new ~ type + sex + eye

Re: [R] StackRaster problem

2014-08-26 Thread Jon Skoien
Did you attach the raster package with library(raster)? It seems the newest version of dismo does not depend on raster, so you will not be able to use raster-functions if you only attach dismo. This error message typically comes when R tries to use utils:::stack.default instead of the

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

2014-08-26 Thread William Dunlap
as.environment(characterString) maps an entry from the output of search() to the environment at the named position in the search list. as.environment(number) maps an index into the output of search() to the the environment at that position in the search list. If 'characterString' is not in the

Re: [R] Plot survreg and intcox

2014-08-26 Thread David Winsemius
On Aug 26, 2014, at 4:17 AM, Silong Liao wrote: Dear R users, I'm trying to plot survival probability against time(in years) using survreg and intcox. Please can you help me with this problem? That line at the bottom of the message delivered to the list subscribers saying that the HTL

[R] buit a package using Rstudio and existing R files

2014-08-26 Thread Karim Mezhoud
Dear All, I am trying to built for the first time a package. I am following this tutorial: https://support.rstudio.com/hc/en-us/articles/200486488-Developing-Packages-with-RStudio I create a new Project (package) and I added 44 .R sources files (functions). After, I got error message when I built

Re: [R] Help with lsmeans

2014-08-26 Thread Ben Bolker
Dan Dillon dgdillon at gmail.com writes: Colleagues: [snip] My data are from a behavioral experiment in which two groups of subjects complete 200+ trials of a task with two conditions. Each subject is tested in one of four separate locations. I record accuracy (0 or 1) and response

Re: [R] buit a package using Rstudio and existing R files

2014-08-26 Thread Jeff Newmiller
I would suggest building your first package with as few functions as you can (one?). Once you get that working, try adding more functions and keep rebuilding as you go so the error messages don't drown you. In any event, your immediate problem is that CanceR-package.Rd has not been properly

[R] plot for survreg and intcox (rewritten)

2014-08-26 Thread Silong Liao
Dear R users, I'm trying to plot survival probability against time(in years) using survreg and intcox. Please can you help me with this problem? (I have rewritten using plain text.) I tried to use curve function but have no clue. For survreg,

Re: [R] plot for survreg and intcox (rewritten)

2014-08-26 Thread David Winsemius
On Aug 26, 2014, at 2:33 PM, Silong Liao wrote: Dear R users, I'm trying to plot survival probability against time(in years) using survreg and intcox. Please can you help me with this problem? (I have rewritten using plain text.) I tried to use curve function but have no clue. I

[R] lattice: packet.number() versus panel.number()

2014-08-26 Thread Benjamin Tyner
Hi, According to https://svn.r-project.org/R-packages/trunk/lattice/R/print.trellis.R, [panel.number] is usually the same as, but can be different from packet.number and I had been under the impression that as long as the user is not using a custom index.cond nor perm.cond, the panel.number

[R] Clip smaller domain from large domain netCDF file

2014-08-26 Thread Aseem Sharma
Hi, I have this huge ( ~30GB) .nc file (NC_FORMAT_NETCDF4_CLASSIC)) for the whole country 141.00 to 52.00 W, 41.00 to 84.00 N. I am trying to clip this big dataset for a small region specific domain (120.00 to 130.00 W, 50.00 to 60.00 N). I am trying to do using netCDF4 r package but could not

[R] Mixed sorting/ordering of strings acknowledging roman numerals?

2014-08-26 Thread Henrik Bengtsson
Hi, does anyone know of an implementation/function that sorts strings that *contain* roman numerals (I, II, III, IV, V, ...) which are treated as numbers. In 'gtools' there is mixedsort() which does this for strings that contains (decimal) numbers. I'm looking for a mixedsortroman() function

Re: [R] Clip smaller domain from large domain netCDF file

2014-08-26 Thread Roy Mendelssohn
Using the ncdf4 library requires some knowledge of netcdf files and how they work. However, if you can provide the following information I may be able to provide some pointers. I am assuming your file is named myFile.nc. Where you see that replace with the actual name. library(ncdf4)

Re: [R] Mixed sorting/ordering of strings acknowledging roman numerals?

2014-08-26 Thread David Winsemius
On Aug 26, 2014, at 5:24 PM, Henrik Bengtsson wrote: Hi, does anyone know of an implementation/function that sorts strings that *contain* roman numerals (I, II, III, IV, V, ...) which are treated as numbers. In 'gtools' there is mixedsort() which does this for strings that contains

[R] Where to find source of C_pbinom?

2014-08-26 Thread Marius Hofert
Dear expeRts, I would like to find out how R computes pbinom(). A grep in the source code reveiled src/library/stats/R/distn.R:146: .External(C_pbinom, q, size, prob, lower.tail, log.p), so 'C_pbinom' refers to compiled C/C++ code loaded into R. Where can I find the source code of C_pbinom?

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

2014-08-26 Thread PO SU
So, the decisive factor is whether the input string be on the search() name list, and not related with the envir's name attribute. When we using attach, it is becasue the name attribute just match the search() name list(or say,search() name list just use the name attribute), so

[R] NA's introduced by coercion

2014-08-26 Thread madhvi.gupta
Hi, I am applyin function as.numeric to a vector having many values as NA and it is giving : Warning message: NAs introduced by coercion Can anyone help me to know how to remove this warning and sor it out? Thanks Madhvi __ R-help@r-project.org

Re: [R] NA's introduced by coercion

2014-08-26 Thread Steve Lianoglou
Hi, On Tue, Aug 26, 2014 at 9:56 PM, madhvi.gupta madhvi.gu...@orkash.com wrote: Hi, I am applyin function as.numeric to a vector having many values as NA and it is giving : Warning message: NAs introduced by coercion Can anyone help me to know how to remove this warning and sor it out?

[R-es] color de fondo de un gráfico creado con ggplot

2014-08-26 Thread Hector Gómez Fuerte
En un grfico creado con el comando ggplot (de la librera ggplot2) se puede establecer un fondo blanco con theme_set(theme_bw()), o volver al grs (que tiene por defecto) con theme_gray(). Es posible establecer un fondo de otro color? Otra pregunta: si dibujamos un grfico usando facets, es decir con

Re: [R-es] color de fondo de un gráfico creado con ggplot

2014-08-26 Thread daniel
Intenta con esto, library(ggplot2) DF - data.frame( nombre = c( uno, dos, tres, cuatro), sector = c( 1,2), x = rnorm(400)) m - ggplot(data = DF, aes(x = sector, y = x)) + geom_point() + facet_wrap(~nombre) m + theme(panel.background = element_rect(fill = blue), strip.background =

Re: [R-es] color de fondo de un gráfico creado con ggplot

2014-08-26 Thread Hector Gómez Fuerte
Muchas gracias por las respuestas! Saludos, H. Gmez Enviar:martes 26 de agosto de 2014 a las 21:17 De:Carlos Ortega c...@qualityexcellence.es Para:Hector Gmez Fuerte hect...@gmx.es CC:Lista R r-help-es@r-project.org Asunto:Re: [R-es] color de fondo de un grfico creado con ggplot Hola, Aqu