similar to: Make as.factor an S3 generic?

Displaying 20 results from an estimated 5000 matches similar to: "Make as.factor an S3 generic?"

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)
2002 Nov 29
1
need help with make failing for R 1.6.1 in Solaris 8
Anyone know how to resolve this issue? Thanks in advance. gcc -L/usr/local/lib -o R.bin CConverters.o Rdynload.o RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o devPS.o devPicTeX.o deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o
2007 Jun 21
2
segfault during cbind
The following code results in a seg fault. > sessionInfo() R version 2.6.0 Under development (unstable) (2007-06-21 r42013) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_MONETARY=en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C attached base packages: [1] stats graphics
2004 Sep 22
1
Compile error in 2004-09-21 R 1.9.1 Patched
Hi all, I just downloaded the latest R-patched tarball [Version 1.9.1 Patched (2004-09-21)] and ran into an error during compilation. This is on FC2 and the error is as follows: dounzip.c: In function `do_unzip': dounzip.c:144: error: syntax error before '/' token make[3]: *** [dounzip.o] Error 1 In reviewing the source file, there appears to be an errant '/' on line 144. A
2011 Jul 19
1
requiring NAMESPACE re-installation marked as old.packages?
It would be convenient if, under R-devel r56422, packages that require re-installation because they do not have a NAMESPACE were marked as old.packages, so their lack of functionality can be discovered more easily. > "snow" %in% row.names(old.packages()) [1] FALSE > library(snow) Error in library(snow) : package 'snow' does not have a NAMESPACE and should be
2007 May 13
1
Help understanding LAPACK symbol resolution
R developers, I am trying to understand how symbols are resolved, so that I can configure a package that I contributed to, and so that I can provide guidance to (linux / OSX) users of the package. To be concrete, my package uses the LAPACK Fortran symbol zsysv. This is not in libRlapack, but is defined on my system in the library /usr/lib64/liblapack.so. * I suspect that the reason the symbol is
2020 May 07
1
defining r audio connections
https://github.com/jimhester/archive was not allowed on CRAN when I submitted it 3 years ago due to this restriction. Being able to write custom connections is a useful feature for a number of applications, I would love this policy to be reconsidered. On Wed, May 6, 2020 at 10:30 PM Henrik Bengtsson <henrik.bengtsson at gmail.com> wrote: > What's the gist of the problem of
2020 May 06
2
defining r audio connections
yep, you're right, after some initial clean-up and running with or without --as-cran R CMD check gives a NOTE * checking compiled code File ?socketeer/libs/socketeer.so?: Found non-API calls to R: ?R_GetConnection?, ?R_new_custom_connection? Compiled code should not call non-API entry points in R. See 'Writing portable packages' in the 'Writing R
2015 May 12
1
S4 method dispatch sometimes leads to incorrect when object loaded from file?
>>>>> Martin Morgan <mtmorgan at fredhutch.org> >>>>> on Mon, 11 May 2015 10:18:07 -0700 writes: > On 05/10/2015 08:19 AM, Martin Morgan wrote: >> Loading an S4 object from a file without first loading the library sometimes (?, >> the example below and actual example involves a virtual base class and the show >> generic)
2015 Aug 25
1
Issues with libcurl + HTTP status codes (eg. 403, 404)
In fact, this does reproduce on R-devel: > options(download.file.method = "libcurl") > options(repos = c(CRAN = "https://cran.rstudio.com/", CRANextra = + "http://www.stats.ox.ac.uk/pub/RWin")) > install.packages("lattice") ## could be any package Installing package into ?/Users/kevinushey/Library/R/3.3/library? (as ?lib? is
2016 Aug 17
1
table(exclude = NULL) always includes NA
The quirk as in table(1:3, exclude = 1, useNA = "ifany") is actually somewhat documented, and still in R devel r71104. In R help on 'table', in "Details" section: It is best to supply factors rather than rely on coercion. In particular, ?exclude? will be used in coercion to a factor, and so values (not levels) which appear in ?exclude? before coercion will be mapped to
2010 Mar 31
1
You are right and the problem is solved. Re: about the possible errors in Rgraphviz Package
Hi Martin, It is really a 'PATH' problem. After adding C:\Program Files\Graphviz2.20\bin to the 'PATH' environment variable, the Rgraphviz package can be loaded without any error messages. Sorry that I ONLY set my 'PATH' environment variable correctly for R but not for Graphviz. Thank you and Duncan so much for your great help. Howard On Tue Mar 30 18:12:54
2016 Aug 15
1
table(exclude = NULL) always includes NA
>>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Mon, 15 Aug 2016 11:07:43 +0200 writes: >>>>> Suharto Anggono Suharto Anggono <suharto_anggono at yahoo.com> >>>>> on Sun, 14 Aug 2016 03:42:08 +0000 writes: >> useNA <- if (missing(useNA) && !missing(exclude) && !(NA %in%
2020 May 06
2
defining r audio connections
The public connection API is defined in https://github.com/wch/r-source/blob/trunk/src/include/R_ext/Connections.h I'm not sure of a good pedagogic example; people who want to write their own connections usually want to do so for complicated reasons! This is my own abandoned attempt
2010 Apr 21
2
suggestion how to use memcpy in duplicate.c
>From copyVector in duplicate.c : void copyVector(SEXP s, SEXP t) { int i, ns, nt; nt = LENGTH(t); ns = LENGTH(s); switch (TYPEOF(s)) { ... case INTSXP: for (i = 0; i < ns; i++) INTEGER(s)[i] = INTEGER(t)[i % nt]; break; ... could that be replaced with : case INTSXP: for (i=0; i<ns/nt; i++) memcpy((char *)DATAPTR(s)+i*nt*sizeof(int),
2017 Dec 20
1
utils::unzip ignores overwrite argument, effectively
It does give a warning, but then it overwrites the files, anyway. Reproducible example below. This is R 3.4.3, but it does not seem to be fixed in R-devel: https://github.com/wch/r-source/blob/4a9ca3e5ac6b19d7faa7c9290374f7604bf0ef64/src/main/dounzip.c#L171-L174 FYI, G?bor dir.create(tmp <- tempfile()) setwd(tmp) cat("old1\n", file = "file1") cat("old2\n", file
2014 Sep 10
1
install.packages misleads about package availability?
In the context of installing a Bioconductor package using our biocLite() function, install.packages() warns > install.packages("RUVSeq", repos="http://bioconductor.org/packages/2.14/bioc") Installing package into '/home/mtmorgan/R/x86_64-unknown-linux-gnu-library/3.1-2.14' (as 'lib' is unspecified) Warning message: package 'RUVSeq' is not available
2019 Jan 04
2
Compiler + stopifnot bug
Thanks for the reports. Will look into it soon and report back. Luke Sent from my iPhone > On Jan 3, 2019, at 2:15 PM, Martin Morgan <mtmorgan.bioc at gmail.com> wrote: > > For what it's worth this also introduced > >> df = data.frame(v = package_version("1.2")) >> rbind(df, df)$v > [[1]] > [1] 1 2 > > [[2]] > [1] 1 2
2016 Sep 10
1
table(exclude = NULL) always includes NA
Looking at the code of function 'table' in R devel r71227, I see that the part "remove NA level if it was added only for excluded in factor(a, exclude=.)" is not quite right. In is.na(a) <- match(a0, c(exclude,NA), nomatch=0L) , I think that what is intended is a[a0 %in% c(exclude,NA)] <- NA . So, it should be is.na(a) <- match(a0, c(exclude,NA),
2015 Aug 25
3
Issues with libcurl + HTTP status codes (eg. 403, 404)
Hi Martin, Indeed it does (and I should have confirmed myself with R-patched and R-devel before posting...) Thanks, and sorry for the noise. Kevin On Tue, Aug 25, 2015, 13:11 Martin Morgan <mtmorgan at fredhutch.org> wrote: > On 08/25/2015 12:54 PM, Kevin Ushey wrote: > > Hi all, > > > > The following fails for me (on OS X, although I imagine it's the same >