similar to: S3 classes and building a package

Displaying 20 results from an estimated 10000 matches similar to: "S3 classes and building a package"

2008 Sep 09
1
building a package that contains S4 classes and methods
Hello R users, I am trying to make a my first package and I get an error that I can understand. The package is build out of three files (one for functions, 1 for s4 classes and 1 for s4 methods). Once I source them I run package.skeleton( name="TDC" ) within a R session and I get Creating directories ... Creating DESCRIPTION ... Creating Read-and-delete-me ... Saving functions and
2008 Mar 30
1
package.skeleton.S4
Hi the devel list. I am adapting the package.skeleton to S4 classes and methods I would have been very proud to post a new working function on this list. Unfortunately, I do not manage to solve all the problems. Mainly - sys.source does not compile a file with setClass - dumpMethod does not exists yet In the following code, thise two problems are notified by a line ################# Still
2009 May 29
1
Problem making a package using S4 objects.
Hello. I've developed an algorithm in R which I need to package. The implementation uses S4 objects and it's divided in 5 files. Everything is working fine when I load the files into the R console but when I try to make a package I get an error that I don't quite understand. Here's what I do: *1.* in R console, I do and get: > package.skeleton(name='remora') Creating
2011 Mar 06
1
Seeking guidance in package creation when it contains s4 class
Dear all, I am having problem to create a package when this package is supposed to have some newly created s4 class. Here is my workout: > #rm(list = ls()) > setClass("aClass", sealed=T, representation(slot1 = "vector", slot2 = "character")) [1] "aClass" > fn1 <- function(x, y, z) { + x <- x[1] + y <- y[1] + z <- as.character(z[1]) +
2008 Aug 07
1
package.skeleton does invalide regular name, bis... (PR#12020)
Hi the list, I guess I find an other bug (the first one is at the end off this mail) in package.skeleton. It occurs when we give as code_file some file that are not in the current directories. If we give a single file to code_file (like code_file=3D"riri/fifi.R"), it does not reconize fifi.R as a regular name and change it to riri/zfifi.R If we give several file to code_file (like
2010 Jun 23
2
format: different S4 behavior in a package
R-Devel-ers: I have an S4 method that simply formats an object: setGeneric("formatMe", function(x) standardGeneric("formatMe")) setMethod("formatMe", "ANY", function(x) format(x)) If I issue the above in an R session, then define an S4 class with its own format method, I get the desired result: > setClass("A",contains="numeric")
2009 Mar 01
0
R package.skeleton
Hi I am getting the following error > package.skeleton("ohri") Creating directories ... Creating DESCRIPTION ... Creating Read-and-delete-me ... Saving functions and data ... Making help files ... Done. Further steps are described in './ohri/Read-and-delete-me'. Warning messages: 1: In dump(internalObjs, file = file.path(code_dir, sprintf("%s-internal.R", :
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 Sep 08
1
invalid strings while parsing code with inlinedocs package.skeleton.dx()
Dear list members, I use the package inlinedocs to create documentation for a package that I am building. The function package.skeleton.dx() is used to convert the source *.R file into the *.Rd documentation file. Usually this works like a charm, but on several occasions I got messages like this one: extra.code.docs prefixed.lines extract.xxx.chunks title.from.firstline
2004 Apr 22
2
Adtran TA750 Noise
All, I need help. I have an (actually 2) Adtran TA750's with 8 FXO ports. I get a terrible buzz on every FXO port. If I unplug the Adtran and put an analog phone on each incoming line, I have no buzz. I also have 2 Carrier Access Access Bank I's with 12 FXO ports. When I plug the same analog lines into either one of those, no noise or buzz whatsoever. I went so far as to move the TA750
2006 Sep 12
1
package.skeleton() in R-2.4.1
Hi R version 2.4.0 alpha (2006-09-06 r39158) MacOSX 10.4.7 There was a thread some time ago as to whether the structure created by package.skeleton() would pass R CMD check. I have an example where package.skeleton() gives an R file that gives an error when sourced. If I type setClass("brob", representation = representation
2004 Nov 24
1
Horrible BUZZZZ noise when sounds/music play on SIP phone?
Hi, I've recently set Asterisk up, 1.0.2 version. With 1 x X100P card and 1 SIP phone. I've noticed some horrible buzz/rasping type of sounds! These seem to occur when * is trying to play back some audio or sound to me? E.g. If I have an exten rule which plays one of the music on hold files when I dial 800 lets say, I get a really loud buzz for about 2 seconds and then the music plays.
2020 Feb 18
2
Possible Regression in setClassUnion between 3.5.0 and 3.6.0
I am trying to create a class union of class unions to facilitate method dispatch. When I execute code in the global environment, everything acts as expected, however when I put the same code in the context of a package, selectMethod can no longer find the correct method. This first block below puts the code in the context of a package: fn <- "codefile.R" writeLines( c(
2019 Nov 15
2
S3 methods in packages. Change in R 4.0.0?
Hello, since Bioconductor devel branch 3.11 started, which is operating with R-devel 4.0.0 (for e.g. 2019-11-03 r77362 on OS X 10.11.6 El Capitan), my package CFAssay 1.21.0 is not built on none of all three Systems, Linux, Windos and Mac. The error message refers to xy.coords which is called by R function plot.default. I found out that it has to do with the S3 object system. In my package I
2008 Apr 13
1
R 2.7 package.skeleton
Hi the devel list I am testing package.skeleton in R 2.7 (download today). I get an error that I do not understand. I guess it is not an error from my code since I have no probleme when I source it. So is it a error in package.skeleton? Here is my code : --- 8< ------ File essai.r ------------- setClass( Class="ClusterizLongData", representation=representation(
2013 Apr 20
7
Reshape or Plyr?
H all, I have relative abundance data from >100 sites. This is from acoustic monitoring and usually the data is for 2-3 nights but in some cases my be longer like months or years for each location.. The data output from my management data base is proved by species by night for each location so data frame would look like this below. What I need to do is sum the Survey_time by Spec_Code for
2020 Feb 19
2
Possible Regression in setClassUnion between 3.5.0 and 3.6.0
Thanks, I'll look into it. On Tue, Feb 18, 2020 at 8:32 AM Ezra Tucker <ezztucker at gmail.com> wrote: > > Hi Robert, > > This looks like a bug to me (tested in R 3.6.2 on Windows), f(new("a")) > should return "hi!". I'll add that this DOES work properly in 3.6.1 > which leads me to suspect this could be due to the subtle change in the > way
2012 Dec 08
1
namespace S3 and S4 generic imports cannot both be satisfied:
PkgA wishes to write a method for 'unique' on S4 class 'A'. ?Methods indicates that one should setGeneric("unique") setClass("A") unique.A <- function(x, incomparables=FALSE, ...) {} setMethod(unique, "A", unique.A) Both S3 and S4 methods need to be exported in the NAMESPACE import(methods) S3method(unique, A)
2013 Jun 04
0
bug in package.skeleton(), and doc typo.
Hi all, I think there's a bug in package.skeleton(), when using the environment argument: Example: env <- new.env() env$hello <- function() { print('hello') } package.skeleton(name='mypkg', environment=env) ==> does not create any source in mypkg/R/* By the way, package.skeleton(name='mypkg', environment=env, list="hello") does not work either.
2006 Jan 08
2
exporting methods/classes
Dear R People: I'm still struggling with sending methods and classes as part of creating a new package. Where does the .onLoad function go? Within R itself or in a file in one of the new package directories? Here are my latest efforts: Here's the last part of the woof1-Ex.Rout > library('woof1') Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =