Displaying 20 results from an estimated 1000 matches similar to: "R.oo Destructors"
2011 Sep 22
1
R.oo: do work on data member at construction
Hello,
I'd like to 'do work' on data members upon construction (i.e. without
implementing it in a get method). Is this the best way to create data member
'z' upon construction? I'm thinking if .z=paste(x,y) below gets more complex
I'll run into issues.
setConstructorS3("MyClass", function(x=NA,y=NA,...) {
this <- extend(Object(), "MyClass",
2005 Jul 08
2
R.oo static field
How can I define a static member of a class? not a static method,
rather a static field that would be accessed by all instances of the
class.
2008 Dec 10
1
First call to constructor fails (R.oo)
Hi all,
I'm trying to do some object-oriented programming in R using the R.oo
package.
Right from the start I encountered a strange (at least for me) problem. I
define a new class/constructor based on the R.oo documentation.
However the first attempt to create an object fails:
=== Code: ===
library(R.oo);
setConstructorS3("MyClass",function(param) {
print(param);
2007 Jan 19
5
C vs. C++ as learning and development tool for R
I have 3 years of experience with R and have an interest in becoming a
better programmer so that I might someday be able to contribute
packages. Other than R, my only experience was taking Lisp from Daniel
Friedman in the 1970's. I would like to learn either C or C++ for
several reasons:
To gain a better concept of object oriented programming so that I can
begin to use S4 methods in R.
To
2008 May 06
3
rggobi is crashing R-2.7.0
I am running 64-bit Ubuntu 8.04 and when I invoke rggobi the interactive
graph displays but R crashes. See my sessionInfo() and a short example
below. Ggobi and rggobi installed without complaints. Mark
> sessionInfo()
R version 2.7.0 Patched (2008-05-04 r45620)
x86_64-unknown-linux-gnu
locale:
2012 Sep 21
2
[LLVMdev] Clang API parsing of the destructor
I am using the clang API (version 3.1 - trunk 153913) to compile some very simple code as follows
class MyClass
{
~MyClass() ;
};
MyClass::~MyClass()
{
}
int main()
{
return 0;
}
My problem is that I get the error message: test.cpp:20:10: error: destructor cannot have a return type MyClass::~MyClass()
If someone can point me to the right direction that would be great. It compiles fine if
2012 Sep 21
0
[LLVMdev] Clang API parsing of the destructor
On Fri, Sep 21, 2012 at 12:22 PM, Kamaljit Lall <klall at factset.com> wrote:
> I am using the clang API (version 3.1 - trunk 153913) to compile some
> very simple code as follows****
>
> class MyClass
> {
> ~MyClass() ;
>
> };
>
> MyClass::~MyClass()
> {
>
> }
>
> int main()
> {
> return 0;
> } ****
>
> My problem is that
2008 May 03
4
interactive rotatable 3d scatterplot
I would like to create a 3d scatterplot that is interactive in the sense
that I can spin it on its axes to better visualize some PCA results I have.
What are the options in R? I've looked at RGL and perhaps it will suffice
but it wasn't apparent from the documentation I found.
Any demo scripts available for a package that will work?
Mark
--
Mark W. Kimpel MD ** Neuroinformatics **
2007 May 17
4
help with executing instruction every i-th run of loop
I am running a very long loop and would like to save intermediate
results in case of a system or program crash. Here is the skeleton of
what my code would be:
for (i in 1:zillion)
{
results[[i]]<-do.something.function()
if (logical.test(i)) {save(results, "results.tmp")}
}
logical.test would test to see if i/1000 has no remainder. What R
function would test that?
2007 Aug 03
2
RSPython won't load in R 2.6.0 under Linux
I can compile RSPython without difficulty, been when I try to load it, I
get the error messages below. Also below are some cryptic warnings I get
on R boot (in case these are pertinent) and my sessionInfo().
Any help is appreciated. Thanks, Mark
Warning messages:
1: In .updateMethodsInTable(fdef, where, attach) :
Couldn't find methods table for "conditional", package
2007 Jan 31
4
possible spam alert
The last two times I have originated message threads on R or
Bioconductor I have received the message included below from someone
named Patrick Connolly. Both times I was the originator of the message
thread and used what I thought was a unique subject line that explained
as best I could what my question was. Patrick seems to be implying that
I am abusing the R and BioC help newsgroups in this
2008 Aug 05
2
creating overall title for plots made with par(mfrow=c(2,2))
I'm making some plots on the same page and would like to include an overall
title instead of individual main titles as they are similar and their x and
y axis labels are sufficient to distinguish them.
Is there a way to assign an overall "main" to this page of plots?
Mark
--
Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine
15032
2008 Jun 03
2
benchmarking R installations
Recently I posted to this list with a question about using the Intel 10.1
compilers in building R and one response was basically, "why in the heck
would you want to do that?" The answer is that my sysadmin believes that
there will be a performance boost with the Intel vs. Gnu compilers on our
Linux cluster, of which I am one of many users. Wanting to be a good citizen
and use my machine
2008 Jun 24
2
problem with rgl interactivity with R-2.7.1 and Ubuntu Hardy
I'm trying to use the rgl package on R-2.7.1 running on top of Ubuntu
Hardy amd64. using open3d() and plot3d() I get a plot, but it is not
interactive. Furthermore, changes to par3d("FOV"=my.new.value) do
nothing. I suspect something is wrong with the rendering engine or
interface to it. I do have an Nvidia driver installed and compiz works
correctly on the desktop.
I've
2008 Jul 14
1
source code for R-dev packages
Where is the link on www.r-project.org or CRAN to download source code for
development versions of packages? This is straightforward for BioConductor
packages but I can't seem to find it for R packages.
Mark
--
Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine
15032 Hunter Court, Westfield, IN 46074
(317) 490-5129 Work, & Mobile &
2008 Apr 03
1
getting serial anovas from a complex lm object obtained with a matrix of responses
I have fit a model to ~20k different genes and would now like to extract the
p-val for one of the effects, again for each individual gene.
My model code is:
mod <- lm(myResponseMatrix~ Time)
Were I to do this with a response vector rather than matrix, the following
would work:
anovaResult<- anova(mod)
With a more complex lm object, such as that generated above, it seems anova
is trying to
2007 Oct 30
6
trouble installing building packages from source using R 2.6.0 on Ubuntu Gutsy AMD64
I have recently upgraded to Ubuntu Gutsy and, for the first time, am
using a 64-bit installation. After failing miserably to install R from
source, not a problem for me in the past with a 32-bit install, I went
the route of using the Debian Etch build. This went smoothly, but I am
unable to update my numerous R and BioConductor packages, getting
non-zero exit status errors on each package. Is
2007 Sep 20
1
packages MANOR, qvalue, and tkWidgets fail install on Fedora 7 with latest R-beta build
Had some packages fail install so I updated to today's R-beta release.
On updating packages the following packages still fail. sessionInfo
follows. Mark
Warning messages:
1: In install.packages(update[instlib == l, "Package"], l, contriburl =
contriburl, :
installation of package 'MANOR' had non-zero exit status
2: In install.packages(update[instlib == l,
2007 Mar 30
2
Replacing slot of S4 class in method of S4 class?
Dear all,
Assume that I have an S4 class "MyClass" with a slot "myname", which
is initialized to: myname="" in method("initialize"):
myclass <- new("MyClass", myname="")
Assume that class "MyClass" has a method "mymethod":
"mymethod.MyClass" <-
function(object, myname=character(0), ...) {
2020 May 12
4
S3 method dispatch for methods in local environments
Dear All,
In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example:
myfun <- function(y) {
out <- list(y=y)
class(out) <- "myclass"
return(out)
}
print.myclass <- function(x, ...) print(formatC(x$y, format="f", digits=5))
myfun(1:4)
# prints: [1]