search for: eappli

Displaying 20 results from an estimated 26 matches for "eappli".

Did you mean: eapply
2005 Feb 18
1
eapply weirdness/bug
The following looks like an 'eapply' bug to me: t/subtest> e <- new.env() t/subtest> e$tempo <- quote( 1+'hi') t/subtest> lapply( ls( e), function( x) length( get( x,e))) [[1]] [1] 3 # seems reasonable-- e$tempo is a 'call' object of length 3 t/subtest> eapply( e, length) Error in 1 + "hi" : non-numeric argument to binary operator
2006 Apr 11
1
eapply() fails on baseenv() (PR#8761)
eapply() works on most environments, but not on baseenv(). For example, > x <- 1 > eapply(globalenv(), function(x) x) $x [1] 1 > eapply(baseenv(), function(x) x) list() I'm probably not going to have time to work on this before 2.3.0, but I don't think it's really urgent; if no one else fixes it first I'll do it after the release. Duncan Murdoch
2007 Mar 01
1
object is not subsettable
Dear colleagues, I've just come across a problem with the following command which is a part of the "metaOverview.R" code file provided as an monography- accompanying file at http://www.bioconductor.org/docs/mogr/metadata: ################################## R> hasChr <- eapply(GOTERM, function(x) + x[grep("chromosome", Term(x))]) Error in
2008 Mar 19
7
ls() and classes
Dear R People: I want to get the class of all of the objects in my directory. I was trying: do.call(class,list=ls()) but got an "unused argument error". I'm sure it's simple, but I'm just not seeing it. Any help would be much appreciated. Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston -
2013 Mar 12
2
Bugs due to naive copying of list elements
Several bugs are present in R-2.15.3 and R-alpha due to naive copying of list elements. The bug below is due to naive copying in subset.c (with similar bugs for matrices and arrays): a<-list(c(1,2),c(3,4),c(5,6)) b<-a[2:3] a[[2]][2]<-9 print(b[[1]][2]) Naive copying in mapply.c leads to the following bug: X<-1+1 f<-function(a,b) X A<-mapply(f,c(1,2,3),c(4,5,6),SIMPLIFY=FALSE)
2011 Jan 03
7
Saving objects inside a list
Hello there, any ideas on how to save all the objects on my workspace inside a list object? For example, say my workspace is as follows ls() [1] "x" "y" "z" and suppose I want to put these objects inside a list object, say object.list <- list() without having to explicitly write down their names as in object.list$x = x object.list$y = y object.list$z = z Is
2011 Aug 27
1
Make a function work on an environemnt
In my R learning I've come across a situation in which a piece of code that works on the work space outside a function does not work inside the function. WARNING THIS EMAIL CONTAINES THE CODE:#rm(list=ls()) THIS WILL CLEAR ALL OBJECTS FROM YOUR WORKSPACE! When I use rm(list=ls()) and then ls() it shows character(0) So I tried to make a quick function to speed this up as follows:
2009 Dec 24
1
Question to use R plot GO pie chart
Hi, I have a list of IPI gene IDs. I want to find out whether there is a package which can map the gene ontology to these IPIs, and plot the pie chart to demonstrate the molecular function distributions. The input is like the following gene IPI IDs: IPI:IPI00008860.1|SWISS-PROT:Q9BXJ4-1|TREMBL:Q542Y2|ENSEMBL:ENSP00000231338;EN
2015 Mar 01
2
iterated lapply
I think the discussion of this issue has gotten more complicated than necessary. First, there really is a bug. You can see this also by the fact that delayed warning messages are wrong. For instance, in R-3.1.2: > lapply(c(-1,2,-1),sqrt) [[1]] [1] NaN [[2]] [1] 1.414214 [[3]] [1] NaN Warning messages: 1: In FUN(c(-1, 2, -1)[[3L]], ...) : NaNs produced 2: In
2007 Jan 21
1
Working with a set of matrices
Hi, I have a set of matrices (MAT.1, MAT.2, ...) and I'd like to perform the same operation on each of them (for simplicity, say . I'm writing a function for this so that it can be repeated for different sets with different numbers of matrices. The matrices have the same number of columns, but do not have the same number of rows. My thought is to loop thru the set. but I'm not sure
2010 Apr 08
1
how to manipulate object in specific environment?
Hi I want to simplify my problem into a prototype, how to write a function to get all the object in your current environment, e.g. .GlobalEnv, and print their mode? For example, if I have object a,b,c... in my environment, a=1;b='test';c=matrix(0,3,3)..... I want to write a function myfun(), when I run myfun(), this retrieve all the objects in my environment automatically and print
2010 Nov 25
1
About searching criteria
Hi folks, I need to search the dataset on data with name on heading; Run conc density I look at ??help.search and could not resolve; help.search(pattern, fields = c("alias", "concept", "title") What shall I replace "pattern"? I suppose replacing "alias", "concept", "title" with "Run", "conc",
2016 Apr 22
0
non-numeric argument to binary operator problem in stock analysis
I use these codes to get the returns of my simulated portfolio but, I can not get returns as the non-numeric argument to binary operator problem in stoc thank you guys first. library(quantmod)library(quadprog)library(stockPortfolio)library(fPortfolio)library(tseries)source("efficientFrontierFunction.r") myenv <- new.env()##Calculate the mean and sd of the monthly returns of each
2010 May 13
3
How ls() only functions or anything else but functions?
Hello, How ls() only functions or only data objects (basically anything other than functions) such as data.frame, numeric ...? John [[alternative HTML version deleted]]
2012 Jun 19
1
Reference classes and memory consumption
Dear All, It seems that reference classes consume a lot of memory which became a problem for my rather extensive simulation. I prepared a small example. An instance of this minimal class uses about 20K on disk. rm(list=ls(all=TRUE)); MySmallClass = setRefClass("MySmallClass", fields = list( myField = "numeric" ), methods = list( initialize =
2015 Mar 01
0
iterated lapply
On Sun, 1 Mar 2015, Radford Neal wrote: > I think the discussion of this issue has gotten more complicated than > necessary. The discussion has gotten no more complicated than it needs to be. There are other instances, such as Reduce where there is a bug report pending that amounts to the same issue. Performing surgery on expressions and calling eval is not good practice at the R level
2009 Jul 22
3
How to list R object properties & save workspace?
Hi, I am new to R and have a couple of questions. I know how to list all objects (with ls()), but how to list all properties of them? For instance, I found function object.size(), but I would also like to know whether one object is a dataset or just one vector (variable) or even only one value, etc... And another question - how to save workspace to a custom location while running R? Is there
2013 May 16
1
To List or Not To List
Dear R Helpers, A few weeks ago I asked for some help on how to accomplish modifications to data in a set of data frames. As part of that request I mentioned that I realized that one way to accomplish my goal was to put the data frames together in a list but that I was looking for a way to do it with data frames and a loop because I "believe the better thing is to work df by df for my
2009 Aug 11
3
Is there a summary on different version of 'apply' functions? What is the meaning of the prefixes?
Hi, There are quiet a few different 'apply' functions, such as lapply, sapply and many more. I'm very familiar with the 'Apply' function in Mathematica. Can somebody point me a summary of all the 'apply' functions in R. Also, I'm curious that what 'l' and 's' (and other prefixes) stand for in 'lapply' and 'sapply' Regards, Peng
2010 Oct 25
2
extracting characteristics of datasets from data()
I can use data() to find the available datasets in a package, but I'd like to extract and display some additional information for each dataset than what is provided by data(), e.g., class() and dim() for datasets for which these are available. I'm stuck on using using lapply properly with objects, rather than the names of objects that I get from data() Example: > DS <-