Displaying 20 results from an estimated 200 matches similar to: "object is not subsettable"
2017 Jun 04
2
read.table
Hi All,
I wonder if there should be one character for quote= in read.table, i.e.,
> args(read.table)
function (file, header = FALSE, sep = "", quote = "\"'", dec = ".",
...
I have a file containing the following lines,
08248-GOTERM 3'-phosphoadenosine 5'-phosphosulfate biosynthetic process
08279-GOTERM 3'-phosphoadenosine
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
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 -
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
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)
2005 May 04
1
error with the function GOHyperG from GOstats package
I am running R 2.0.0, GOstats 1.1.1 and GO 1.7.0,
and when I use the function GOHyperG, I have the following error:
w1<-as.list(hgu95av2LOCUSID)
w2<-unique(unlist(w1))
set.seed(123)
myLL<-sample(w2,100)
xx <- GOHyperG(myLL)
Error in mget(x, env = GOTERM, ifnotfound = NA) :
recursive default argument reference
In fact first I tried this function with my locusId ' list (with
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
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:
2011 Sep 13
2
GO & Protein Complex Analysis for Homo sapiens
Dear All,
I need to fetch GO ontologies for Homo sapiens with their mappings to
corresponding Uniprot identifiers. I would be using this information to
compare result from a clustering algorithm with existing protein complexes.
This would be a test to check how the clustering algorithm accurately
captures GO terms with respect to the known protein complexes. Can anyone
suggest a simple workflow
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",
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 =
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
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
2017 Jun 04
0
read.table
On 04.06.2017 11:50, jing hua zhao wrote:
> Hi All,
>
>
> I wonder if there should be one character for quote= in read.table, i.e.,
>
>
>> args(read.table)
> function (file, header = FALSE, sep = "", quote = "\"'", dec = ".",
> ...
>
> I have a file containing the following lines,
>
>
> 08248-GOTERM
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