search for: s4vectors

Displaying 20 results from an estimated 48 matches for "s4vectors".

2016 Jun 26
2
3 minor issues with getClass 'resolve.msg' arg
Hi, It turns out that two packages (1 Bioconductor, 1 CRAN) define an S4 class called "Annotated": library(S4Vectors) # see (*) at bottom for how to install library(RNeXML) 1st issue --------- getClass() issues the same warning twice: tmp <- getClass("Annotated") Found more than one class "Annotated" in cache; using the first, from namespace 'S4Vectors' Found more t...
2016 Jul 11
0
3 minor issues with getClass 'resolve.msg' arg
>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>> on Sun, 26 Jun 2016 13:21:00 -0700 writes: > Hi, > It turns out that two packages (1 Bioconductor, 1 CRAN) define an > S4 class called "Annotated": > library(S4Vectors) # see (*) at bottom for how to install > library(RNeXML) > 1st issue > --------- > getClass() issues the same warning twice: > tmp <- getClass("Annotated") > Found more than one class "Annotated" in cache; using the first, from...
2018 Jun 08
1
Subsetting the "ROW"s of an object
On 06/08/2018 10:15 AM, Michael Lawrence wrote: > There probably should be an abstraction for this. In S4Vectors, we > have extractROWS(). FWIW the code in S4Vectors that does what your subset_ROW() does is: https://github.com/Bioconductor/S4Vectors/blob/04cc9516af986b30445e99fd1337f13321b7b4f6/R/subsetting-utils.R#L466-L476 (This is the default "extractROWS" method.) Except for the normali...
2016 Feb 18
2
R Package Installation Ignores libPaths Setting
Good day, If the library path is changed with .libPaths, the command install.packages("/nb/dario/Biostrings_2.39.9.tar.gz", repos=NULL) fails with ** testing if installed package can be loaded Error : package ?S4Vectors? required by ?Biostrings? could not be found However, running library(S4Vectors) followed by sessionInfo() after the error shows that the package can indeed be found by R R version 3.2.3 Patched (2016-02-14 r70170) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 8 (jessie)...
2005 Jan 14
1
S3/S4 classes performance comparison
Hi R-devel, If you did read my survey on Rhelp about reporting, you may have seen that I am implementing a way to handle outputs for R (mainly target output destinations: xHTML and TeX). In fact: I does have something that works for basic objects, entirely done with S4 classes, with the results visible at: http://www.stat.ucl.ac.be/ROMA/sample.htm http://www.stat.ucl.ac.be/ROMA/sample.pdf To
2019 Jul 08
1
Format printing inside a matrix
...splaying an object in a cell would be a reasonable solution for this particular problem. However, as soon as you start treating these objects as data (like putting them into a matrix), you're likely going to want vectorized operations over them, which means formalized vector and matrix classes. S4Vectors in Bioconductor facilitates this for vectors, but not for higher-order arrays. Michael On Sun, Jul 7, 2019 at 4:44 PM Abby Spurdle <spurdle.a at gmail.com> wrote: > > > I am not sure if there is an existing solution to this, but I want my S4 > > objects inside a list matrix s...
2017 Jun 27
0
paste strings in C
To do this in C, it would probably be easier and faster to just do the string manipulation directly. Luckily, there are already packages that have done this for you. See an example below using the S4Vectors package. foo2 <- function(mymat, colnms, tilde=FALSE) { chars <- colnms[col(mymat)] lowerChars <- if (tilde) paste0("~", chars) else tolower(chars) chars <- ifelse(mymat==1L, lowerChars, chars) keep <- mymat > 0L charList <- split(chars[keep], row...
2017 Jun 27
2
paste strings in C
Dear R-devs, Below is a small example of what I am trying to achieve, that is trivial in R and I would like to learn how to do in C, for very large matrices: > (mymat <- matrix(c(1,0,0,2,2,1), nrow = 2)) [,1] [,2] [,3] [1,] 1 0 2 [2,] 0 2 1 And I would like to produce: [1] "a*C" "B*c" Which can be trivially done in R via something like: foo
2015 Oct 07
1
Error generated by .Internal(nchar) disappears when debugging
...0-17 [5] gsl_1.9-10 mvtnorm_1.0-3 grid_3.2.0 stats4_3.2.0 [9] lattice_0.20-31 stabledist_0.7-0 fortunes_1.5-2 On Wed, Oct 7, 2015 at 9:52 PM, Cook, Malcolm <MEC at stowers.org> wrote: > What other packages do you have loaded? Perhaps a BioConductor one that > loads S4Vectors that announces upon load: > > Creating a generic function for 'nchar' from package 'base' in > package 'S4Vectors' > > Maybe a red herring... > > ~Malcolm > > > -----Original Message----- > > From: R-devel [mailto:r-devel-bounces...
2018 Jun 08
6
Subsetting the "ROW"s of an object
Hi all, Is there a better to way to subset the ROWs (in the sense of NROW) of an vector, matrix, data frame or array than this? subset_ROW <- function(x, i) { nd <- length(dim(x)) if (nd <= 1L) { x[i] } else { dims <- rep(list(quote(expr = )), nd - 1L) do.call(`[`, c(list(quote(x), quote(i)), dims, list(drop = FALSE))) } } subset_ROW(1:10, 4:6) #> [1] 4 5 6
2015 Oct 07
0
Error generated by .Internal(nchar) disappears when debugging
What other packages do you have loaded? Perhaps a BioConductor one that loads S4Vectors that announces upon load: Creating a generic function for 'nchar' from package 'base' in package 'S4Vectors' Maybe a red herring... ~Malcolm > -----Original Message----- > From: R-devel [mailto:r-devel-bounces at r-project.org] On Behalf Of Duncan > Murdoch...
2016 Feb 18
0
R Package Installation Ignores libPaths Setting
...07:00, Dario Strbenac wrote: > Good day, > > If the library path is changed with .libPaths, the command > > install.packages("/nb/dario/Biostrings_2.39.9.tar.gz", repos=NULL) > > fails with > > ** testing if installed package can be loaded > Error : package ?S4Vectors? required by ?Biostrings? could not be found > > However, > > running library(S4Vectors) followed by sessionInfo() after the error shows that the package can indeed be found by R > > R version 3.2.3 Patched (2016-02-14 r70170) > Platform: x86_64-pc-linux-gnu (64-bit) > Runni...
2015 Oct 05
9
Error generated by .Internal(nchar) disappears when debugging
On 05/10/2015 7:24 PM, Matt Dowle wrote: > Joris Meys <jorismeys <at> gmail.com> writes: > >> >> Hi all, >> >> I have a puzzling problem related to nchar. In R 3.2.1, the internal > nchar >> gained an extra argument (see >> https://stat.ethz.ch/pipermail/r-announce/2015/000586.html) >> >> I've been testing code using the
2015 Jan 23
0
issue with update.packages()
...i : Version 1.0 installed in /Library/Frameworks/R.framework.develMav/Versions/3.2/Resources/library Version 1.29.17 available at http://bioconductor.org/packages/3.1/bioc Update (y/N/c)? y also installing the dependencies ?IRanges?, ?BiocGenerics?, ?Biobase?, ?GenomeInfoDb?, ?DBI?, ?RSQLite?, ?S4Vectors? trying URL 'http://bioconductor.org/packages/3.1/bioc/src/contrib/IRanges_2.1.35.tgz' Error in download.file(url, destfile, method, mode = "wb", ...) : cannot open URL 'http://bioconductor.org/packages/3.1/bioc/src/contrib/IRanges_2.1.35.tgz' In addition: Warning mess...
2018 Jun 26
3
list of methods
I recently got a request to add head() and tail() methods for Surv objects, which is quite reasonable, but not unlike other requests for logLik,? vcov, extractAIC, ...?? What they all have in common is that are methods added since creation of the survival package, and that I didn't know they existed. To try and get ahead of the curve, is there a way to list names of all of the default
2015 Jan 24
3
Proper way to define cbind, rbind for s4 classes in package
Hi all, this question has already been posted on stackoverflow, however without success, see also http://stackoverflow.com/questions/27886535/proper-way-to-use-cbind-rbind-with-s4-classes-in-package. I have written a package using S4 classes and would like to use the functions rbind, cbind with these defined classes. Since it does not seem to be possible to define rbind and cbind directly as S4
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
Hi Kylie, Is it a list with only numerics in it? (I only see REALSXPs there, but obviously inspect isn't showing all of them). If so, you could load it up into one big vector and then also keep partitioning information around. Bioconductor does this (see ?IRanges::CompressedList ). The potential benefit here being that the underlying large vector could then be a big out-of-memory altrep. How
2015 Jan 26
2
Proper way to define cbind, rbind for s4 classes in package
...thods (see ?cBind) I defined >> rbind2 and cbind2 instead: >> > This needs some clarification. It certainly is possible to > define cbind and rbind methods. The BiocGenerics package > defines generics for those and many methods are defined by > e.g. S4Vectors, IRanges, etc. The issue is that dispatch > on "..." is singular, i.e., you can only specify one class > that all args in "..." must share (potentially through > inheritance). > Thus, trying to combine objects from a > different hierarchy (or...
2019 Jul 24
1
[External] Re: Any plans for ALTREP lists (VECSXP)?
I can work on this. Thanks Luke. ~G On Wed, Jul 24, 2019 at 8:25 AM Tierney, Luke <luke-tierney at uiowa.edu> wrote: > If one of you wanted to try to create a patch to support ALTREP > generic vectors here are some notes: > > The main challenge I am aware of (there might be others): Allowing > DATAPTR to return a writable pointer would be too dangerous because > the GC
2020 May 24
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
On 5/24/20 00:26, Gabriel Becker wrote: > > > On Sat, May 23, 2020 at 9:59 PM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > On 5/23/20 17:45, Gabriel Becker wrote: > > Maybe my intuition is just > > different?but when I collapse multiple character vectors together, I > > expect?all the