similar to: NAMESPACEs and S4 classes

Displaying 20 results from an estimated 3000 matches similar to: "NAMESPACEs and S4 classes"

2008 Sep 10
1
Computation of contour values - Speeding up computation
Dear R useRs, i have the following code to compute values needed for a contour plot ############################################################ "myContour" <- function(a, b, plist, veca, vecb, dim) { tmpb <- seq(0.5 * b, 1.5 * b, length=dim) tmpa <- seq(0.5 * a, 1.5 * a, length=dim) z <- matrix(0, nrow=dim, ncol=dim) for(i in 1:dim) { for(j in 1:dim)
2011 Aug 01
2
Errors, driving me nuts
Greetings all, I am getting this error that is driving me nuts... (not a long trip, haha) I have a set of files and in these files I want to calculate ttests on rows 'compareA' and 'compareB' (these will change over time there I want a variable here). Also these files are in many different directories so I want a way filter out the junk... Anyway I don't believe that this is
2007 May 09
1
How to read several text files at once!
Dear R users, I am a beginner in R. I have 506 text files (data frame) in one folder namely DATA. The files are called A1 to A253 (253 files) and B1 to B253 (another 253 files). Each file has two columns; V1 (row number) and V2 (the value for each row name). Now I would like to add the values of V2 in each A-file with its relative value in B-file and save it as a new data frame named as C (e.g. C1
2008 May 30
1
NAMESPACE & methods guidance, please
My conception of how NAMESPACE and methods in R-2.7.0 resolved a generic 'func' to a func-method was to search as follows: In 2.7.0: func --> NAMESPACE, including Imports: (and other details) --> .GlobalEnv, and eventually Depends: since these are on search() In R-devel it seems like func --> NAMESPACE, including Imports: (and other details) --> ?? but not
2005 Aug 11
1
Registering S3 class from external package
The package I'm working on can extract data from external packages but would otherwise have no dependency on them. However, I desire to be able to dispatch based on an external S3 class if its package is attached (.First.lib). My code is S4-based and its package has NAMESPACE. Registering the external class prior to the other package being attached doesn't seem to work so I am attempting
2014 Sep 10
4
[RFC PATCH v1 0/3] Introducing ARM SIMD Support
libvorbis does not currently have any simd/vectorization. Following patches add generic framework for simd/vectorization and on top, add ARM-NEON simd vectorization using intrinsics. I was able to get over 34% performance improvement on my Beaglebone Black which is single Cortex-A8 based CPU. You can find more information on metrics and procedure I used to measure at
2013 Mar 17
6
Sweave y RStudio
Boanerge: Lo reenvio a la lista con un nuevo asunto. --JIV ---------- Forwarded message ---------- From: boanerge salas muñoz <> Date: 2013/3/17 Subject: Re: [R-es] Histograma con muchos ceros. To: Jorge I Velez <> hola tengo un problema con rstudio. Deseo utilizar la sweave, pero tengo window. rstudio me dice que no encuentra el camino para compilar. Lo que he averiguado es
2001 Sep 27
1
Problem with merge() (PR#1102)
I have encountered a problem with merge() that appears to be a bug. Here's an example to illustrate it. > tmp1 <- data.frame(a=letters[1:3],b=LETTERS[2:4],x=1:3) > tmpa <- expand.grid(a=letters[1:4],b=LETTERS[1:4]) > tmpm.1 <- merge(tmpa,tmp1) > tmpm.2 <- merge(tmp1,tmpa) Error in "names<-.default"(*tmp*, value = vnames) : names attribute must
2002 Mar 13
1
several bugs (PR#918) lists and matrices
### I got bit again by the same bugs I wrote about a year ago. ### The bugs are related to matrices and arrays of lists. ### 1. There is a clear inconsistency in how R handles two ### functionally equivalent statements. ### array() is able to take a list and create a matrix. ### matrix() is unable to create that matrix. > vector("list", 2) [[1]] NULL [[2]] NULL >
2011 Jun 06
1
Seeking help to define method for show() for an S4 object
Dear all, I have created a new S4 class with name "MyClass". Please see below for it's definition. Now I want to create a method for the show() function for this class. In defining this method, what I want is, once user would like see an object of this class some values will be displayed. Then R will ask for **press Enter**. Once user presses enter then, remaining values will be
2004 Jul 22
2
Files and classes in a package?
While installing my small package, I met a tricky problem. For clarity, let me explain it with the following simplified example. In ~/pkg/R/aclass.R, setClass("aclass", contains="bclass", representation(i="numeric")) In ~/pkg/R/bclass.R, setClass("bclass", representation(j="numeric")) After building a "pkg" package, the file
2008 Oct 08
1
follow up on "[Rd] NAMESPACE & methods guidance, please" ( http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1901.html )
This is a follow-up on the discussion originally posted on the R-devel list ( http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1901.html ), as I have encountered the exact same issue mentioned in Martin's email. Here is a simplified version of my problem: ##================================================================= ## I created a package, say, "tmpA", with a NAMESPACE with
2011 Feb 01
1
Help need to define method of an s4 class
I need some help in defining a "print" method for my new S4 class definition. So fer I have worked like this: setClass("MyClass", sealed=F, representation(slot1 = "list", #create a new class slot2 = "vector", slot3 = "vector", slot4 = "vector")) setMethod("print",
2009 May 18
1
S4 method dispatch and namespaces: why is default method selected
Hi, I ran into the following peculiarity involving S4 method dispatch and namespaces. I develop a package which have a namespace and which depends on 'pixmap' package, which itself does not have a namespace. Now, in my package I have a class which has a slot for objects from class "pixmap" and I want to have a "plot" method for this new class. Not to clutter the
2009 Feb 11
1
setClassUnion with numeric; extending class union
Dear list: I am looking for a good way to create an S4 class that would extend numeric, but would allow NULL instead of data as well. As far as I can see there is no way at the moment to do that, but please correct me if I am wrong. The best solution I came up with so far was the following (it also indicates a problem of using setClassUnion with numeric as one of the classes): I define a class
2004 Oct 06
1
R 2.0.0: namespaces, S4 classes & versioned package installation: failure to resolve correct pkg version
Hi, further down from the problem I asked about yesterday I encounter the following problem (please appologize for the lengthy mail - I have not found a brief example making the issue clear): - using R packages making use of namespaces & - S4 classes when using --with-package-versions in the install call: Pkgs install ok and the first pkg 'base' can be loaded in R
2008 Dec 22
1
How to add a slot to S4 class of an existing package?
Dear all, Since my package is based on S4 classes, I would like to know how to add a slot to an existing S4 class without breaking the code of users of my package. Assume the following S4 class: setClass("MyClass", representation(name = "character", type = "character", data = "data.frame" ), prototype(name =
2009 Jul 09
1
class export in package creation / setClass / namespace?
Dear all, I have been trying to create an R package. This has been successfull until I tried to define classes. Currently, my procedure is the following: Start R, load the function and class definition >tmp <- function (x) {x} >setClass("rpa", contains = "list", where=topenv(parent.frame())) Use package skeleton to create directory structure:
2011 Jun 23
1
Class not found when search in .onLoad
Hi, I am facing with a strange behaviour of isClass and extends when these are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing my package from doing some object initializations at a proper place (i.e. in .onLoad). Suppose one defines two S4 classes in a package, and that one needs to check the inheritance between these two when loading the package (e.g. to validate slots
2004 Feb 24
1
Inheriting from factors + co.
I'm trying to create a formal class that does the following: 1) accept objects of arbitrary class as .Data slot 2) provide a set of other slots that are of fixed type (as usual) The following two approaches came to my mind: A) setClass("myclass", representation("ANY", x = "numeric", y ="numeric")) new("myclass", 1:10) # works