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

2014-08-26 Thread David Winsemius
On Aug 26, 2014, at 3:25 PM, Benjamin Tyner wrote: > 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 th

Re: [R] NA's introduced by coercion

2014-08-26 Thread Steve Lianoglou
Hi Madhvi, First, please use "reply-all" when responding to emails form this list so that others can help (and benefit from) the discussion. Comment down below: On 26 Aug 2014, at 22:15, madhvi.gupta wrote: On 08/27/2014 10:42 AM, Steve Lianoglou wrote: Hi, On Tue, Aug 26, 2014 at 9:56 PM

Re: [R] NA's introduced by coercion

2014-08-26 Thread David Winsemius
On Aug 26, 2014, at 9:56 PM, madhvi.gupta 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? You are the one that

[R] working with matrices

2014-08-26 Thread anna pannas
hello i want to fill a matrix by its upper off diagonal elements specifically I want to take the first and second column of� the matrix and I apply a function to then that returns a single number which I want to place in the (1,2) entry of the matrix, then I want to take the first and third col

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 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? Let's say that t

[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 mai

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 as.environment()

[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? Cheer

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

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) myFi

[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 t

[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 fig

[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.numbe

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.

[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, >mod.reg1=survreg(s_new~type+sex+eye+preopiop+

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 edit

Re: [R] Help with lsmeans

2014-08-26 Thread Ben Bolker
Dan Dillon 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 > tim

[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] 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 HT

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 out

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 stack-func

[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 + se

[R] Weighted Mann-Whitney-Wilcoxon-Test

2014-08-26 Thread Alexander Sommer
On Tuesday, August 19, 2014 9:46 PM Thomas Lumley 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 completeness (and

[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 compl

[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 a

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 A&M University -Original Message- From: r-help-boun...@r-project.org [mailto:r-hel

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] 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 Numeric,

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 lll<-vector("lis

[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 different

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 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 appreciate some he

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 wo

[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