similar to: FW: S4 classes, creating in C

Displaying 20 results from an estimated 100 matches similar to: "FW: S4 classes, creating in C"

2008 Apr 10
1
Computing time when calling C functions - why does an extra function call induce such an overhead?
Dear list, I am a little puzzled by computing time in connection with calling C functions. With the function mysolve1 given below I solve Ax=B, where the actual matrix operation takes place in mysolve2. Doing this 5000 times takes 3.51 secs. However, if I move the actual matrix inversion part into mysolve1 (by uncommenting the two commented lines and skip the call to mysolve2) then the
2003 Oct 27
3
(PR#4806)
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C39C9F.B5DABBD0 Content-Type: text/plain; charset="iso-8859-1" # Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing
2003 Sep 05
1
Problem with S4 slots in C code (PR#4073)
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C3738F.63DE3390 Content-Type: text/plain; charset="iso-8859-1" #I want to be able to create a new S4 class and read data into it using C code # Here is a very simple S4 object inheriting from "array", but with 5
2007 Apr 19
2
setClass inside a function
Hello, I would like to create a function that gets passed a class name and then calls setClass, and a few other functions, inside. I have done this in the past with setmethod, creating accessors for all slots in a set of S4 classes. But setClass is choking when my function is called isnide a package, telling about an error in exists(cname, where). I assume this to be a problem with the
2008 May 28
1
Cross-compilers for 2.7.0
Hello, Am I right in thinking the cross-compilations tools, kindly maintained by Prof Ripley, are still waiting to be updated for 2.7.0? Thanks, Iago -- Iago Mosqueira Cefas Systems Modelling Pakefield Rd. Lowestoft NR33 0HT U.K. +44 (0)1502 558003
2008 May 20
1
S4 generic for lowess
Hi, A lowess method is defined in our package for one of our S4 classes. To explicitely define the generic this is being used if (!isGeneric("lowess")) setGeneric("lowess", useAsDefault = lowess) This works fine for many other methods inherited from various R packages. In this case a warning is issued in R CMD check: * checking R code for possible problems ... NOTE
2008 Mar 26
5
S4 slot with NA default
Hi How do I specify an S4 class with a slot that is potentially numeric, but NA by default? I want the slot to be NA until I calculate its value (an expensive operation, not needed for all applications). When its value is known, I will create a new object with the correct value inserted in the slot. I want "NA" to signify "not known". My attempt fails because
2005 Jan 27
3
weighting in nls
I'm fitting nonlinear functions to some growth data but I'm getting radically different results in R to another program (Prism). Furthermore the values from the other program give a better fit and seem more realistic. I think there is a problem with the results from the r nls function. The differences only occur with weighted data so I think I'm making a mistake in the weighting.
2004 Dec 01
21
Protocol for answering basic questions
I have been following the discussions on 'Reasons not to answer very basic questions in a straightforward way' with interest as someone who is also new to R and has had similar experiences. As such it with sadness that I note that most seem to agree with the present approach to the responses to basic questions. I must thank those respondants to my own questions who have been helpful, but
2004 Oct 14
2
setClassUnion
Hello, I have a question concerning "setClassUnion". I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000. I tried to use "setClassUnion" in a package I am currently working on. The situation is similar to the following example: The DESCRIPTION file has entries: Depends: R (>= 2.0.0), methods Imports: methods LazyLoad: yes The NAMESPACE file has
2004 Oct 14
2
setClassUnion
Hello, I have a question concerning "setClassUnion". I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000. I tried to use "setClassUnion" in a package I am currently working on. The situation is similar to the following example: The DESCRIPTION file has entries: Depends: R (>= 2.0.0), methods Imports: methods LazyLoad: yes The NAMESPACE file has
2004 Nov 01
4
deleting specified NA values
I have a data set of about 10000 records which was compiled from several smaller data sets using SPSS. During compilation 88 false records were accidentally introduced which comprise all NA values. I want to delete these records but not other missing data. The functions na.exclude and na.omit seem to remove all values of NA? How can I delete just the relevant NA's? . i.e. I want to delete
2002 Nov 13
1
DLLs adding in C++ code
I would like to utilise the power of R by adding my own software as a package written in C++. As a first step I am trying to write a DLL with a simple function that can be called from R. The DLL contains a C++ routine written and complied in Microsoft Visual C++ Ver 6.0 and is based upon the example in R-Exts eg I am trying to create the following example function SEXP out(SEXP x, SEXP y) {
2004 Nov 02
4
Loadhistory problems
History files saved using nFile Save History do not open when using File Load History. I notice that when they are saved they do not seem to have a file extension and there is no option to chose an extension. Is this a problem. Other than this it seems so simple that I can't see what the problem is. I've tried using loadhistory and savehistory with the same problems. The syntax guide
2004 Nov 08
2
Nonlinear weighted least squares estimation
Hi there, I'm trying to fit a growth curve to some data and need to use a weighted least squares estimator to account for heteroscedasticity in the data. A weights argument is available in nls that would appear to be appropriate for this purpose, but it is listed as 'not yet implemented'. Is there another package which could implement this procedure? Regards, Robert Brown
2007 Nov 13
1
slots of type "double"
Hi, Any idea why S4 doesn't allow slots of type "double"? > setClass("A", representation(a="double")) Error in makePrototypeFromClassDef(properties, ClassDef, immediate, where) : in making the prototype for class "A" elements of the prototype failed to match the corresponding slot class: a (class ?double? ) "numeric",
2005 May 26
3
Buidling R on Linux (Itanium) fails (PR#7897)
Full_Name: Reinhold Bader Version: 2.1.0 OS: SLES 9 Submission from: (NULL) (129.187.48.1) I tried to build R using the Intel compilers (icc, ifort) and the Math Kernel Libraries for BLAS/LAPACK Optimizations used were -O3, and the FPICFLAGS="-fpic" was exported. The build failed with the following error message: ... dumping R code in package 'methods' Saving namespace image
2009 Jul 22
2
Automatic differentiation in R
Hi I recently gave a presentation about Automatic Differentiation (AD) and R at the Eighth Euro AD Workshop in Oxford (17/07/09). The presentation was intended as a general introduction to R and the desire for a generic AD interface for R. During the presentation I emphasised the need and the high level of interest that the R community has in developing such an interface and that input from the
2009 Feb 04
1
lattice key inside panel
Hello, I am trying to draw a key inside a single panel in a lattice xyplot. The panel function uses panel.number() to use a slightly different style for one of the panels. Once inside than panel I am using draw.key(list(text=list(lab='catch'), lines=list(lwd=c(2)), text=list(lab='landings'), rectangles=list(col=rgb(0.1, 0.1, 0, 0.1)), x=0,
2012 Mar 07
2
SSOAP and Chemspider: Security token?
Dear community, has anyone managed to get SSOAP working with the ChemSpider Web APIs, using functions which need the security token? I use SSOAP 0.9-0 from the OmegaHat repository. In the example code from SSOAP there is a sample which uses a token function. Interestingly, it checks if(!is.character(token)) first (and proceeds if the token is NOT character.) I can't test that function since I