Re: [Rd] Adding support for S7 to base R

2023-03-13 Thread Ezra Tucker
I don't know if this is the right forum, but I'd like to ask an open-ended question about the goals of the S7 OOP system, which is, where do we see the ultimate future of object-oriented programming in R being? Do we see S7 eventually complementing S3 and S4 in "base" (in quotes because S4 is

Re: [R-pkg-devel] Error in inDL(x, as.logical(local), as.logical(now), ...) unable to load shared object

2021-12-23 Thread Ezra Tucker
Hi Tomas and Dirk, Thanks for your suggestions! Between the two, got it working. I didn't know Windows didn't do rpath, I think that you're right that setting the PATH would have helped. I haven't seen that in an R package before, so I did what was in the Rblpapi package, which was creating a

[R-pkg-devel] Error in inDL(x, as.logical(local), as.logical(now), ...) unable to load shared object

2021-12-23 Thread Ezra Tucker
Hi R package developers, I'm developing an R package that wraps NREL's SSC library (https://sam.nrel.gov/), which involves including one header file and linking to one dll. Thus far it is only tested in linux (works just fine there) but I am having trouble building/installing on Windows. The

Re: [Rd] Using R to wrap NREL's SSC library

2021-11-09 Thread Ezra Tucker
ailman/listinfo/r-package-devel. > > On Tue, 09 Nov 2021 16:19:13 + > Ezra Tucker wrote: > > > PKG_LIBS=-L/opt/SAM/2020.11.29/linux_64 > > There's no good answer, but search "Writing R Extensions" for "rpath" > for potential ways of solving this pr

[Rd] Using R to wrap NREL's SSC library

2021-11-09 Thread Ezra Tucker
Hi all, I'm attempting to write a package that wraps a pre-compiled library which is part of the SAM application, put out by NREL, available here: https://sam.nrel.gov/download.html or the source for the library only, available here: https://github.com/nrel/ssc For a variety of reasons, I'd

Re: [Rd] Unexpected behavior with inheritance and using S3 classes as slots in S4 class

2021-01-28 Thread Ezra Tucker
b_1) > > An object of class "n" > > Slot "s1": > > [1] "world" > > attr(,"class") > > [1] "b" "a" > > Cheers, > > Simon > > > On Jan 28, 2021, at 15:55, Ezra Tucker e...@landtucker.com

[Rd] Unexpected behavior with inheritance and using S3 classes as slots in S4 class

2021-01-27 Thread Ezra Tucker
Hi all, I have a situation where I'm trying to use S3 classes as slots in an S4 class and am running into some problems with inheritance. My example: ## with S3 classes a <- function(x) structure(x, class = "a") b <- function(x) structure(x, class = c("b", "a")) setOldClass(c("a", "b")) a_1 <-

Re: [Rd] Possible Regression in setClassUnion between 3.5.0 and 3.6.0

2020-02-18 Thread Ezra Tucker
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 method dispatch was performed to fix a different bug, in 3.6.2.

Re: [Rd] Get memory address of an R data frame

2020-01-09 Thread Ezra Tucker
Hi Lille, Is it possible you're looking for tracemem() or inspect() ? > x <- data.frame(z = 1:10)> tracemem(x)[1] "<0x55aa743e0bc0>" > x[1] <- 2Ltracemem[0x55aa743e0bc0 -> 0x55aa778f6ad0]: tracemem[0x55aa778f6ad0 -> 0x55aa778f6868]: [<-.data.frame [<- tracemem[0x55aa778f6868 -> 0x55aa778f5b48]:

[Rd] Troubles using numeric in s4 class union

2019-11-13 Thread Ezra Tucker
Hi all, I came across an issue in using the Matrix package which made it that I could only subset Matrices using the numeric class, but could not using integers. Steps to reproduce the problem: library(Matrix) # this class has *nothing* to do with Matrix setClass("MyClass",