similar to: Assignment to a list in a function

Displaying 20 results from an estimated 5000 matches similar to: "Assignment to a list in a function"

2002 May 28
1
constrained regression
I want to do a linear regression where the coefficients obey two linear constraints, and also are all non-negative. What is the best way to do this? Computational speed is a consideration as I must do it many times. When this question was asked previously on the list, quadprog was suggested - is this the best solution? (I may have missed something obvious in the documentation, but I have
2003 Jul 09
2
Packages, generics, S3 and S4
My question has two parts. The first is with regard to the frame or environment in which generic functions are defined in packages. It seems as though they are defined (i.e. exist as objects) in frame 1, even when defined in a package. The following is a short example: setClass("track",representation(x="numeric",y="numeric")) plotTrack <- function(x,y,...)
2002 Oct 17
0
RE: R2HTML package for R 1.6
Does this help on our backtest reporting? Regards, Gordon Morrison Global Head of Quantitative Research > * + 44 20 7653 7642 > Mob: + 44 7867 801951 > fax: + 44 20 7645 7442 > * mailto:gordon.morrison at commerzbankib.com > web: http://www.cbksec.com/research/quant > * Commerzbank Securities > 60 Gracechurch Street > London EC3V 0HR, U.K. >
2004 Feb 26
2
package 'stats' needs import directive for 1.9.0?
I maintain the Irregular Time Series (its) package on CRAN. I am currently testing a release. Under 1.8.1 I am able to define a S4 generic 'start' as follows: if(!isGeneric("start")) {setGeneric("start", useAsDefault=start)} Under 1.9.0, Rcmd check generates an error, as 'start' is not recognised. If I use the NAMESPACE directive IMPORT, all is well:
2003 Jun 06
3
irregular time-series
I make quite a lot of use of irregular time-series, and had already spent a bit of time writing an 'its' class when the 'irts' class was released via the package 'tseries'. I have experimented with the 'irts' class, and have some practical issues with its use. In some applications of irregular time-series (in my case these are financial and econometric) there are
2003 Aug 11
1
New package: irregular time-series (its)
I have uploaded to CRAN a new package named 'its' (Irregular Time-Series). It implements irregular time-series as an S4 class, extending the matrix class, and records the time-stamp of each row in the matrix using POSIX. Print, plot, extraction, append, and related functionality are available. Feedback and suggestions are welcome. Giles Heywood
2003 Aug 11
1
New package: irregular time-series (its)
I have uploaded to CRAN a new package named 'its' (Irregular Time-Series). It implements irregular time-series as an S4 class, extending the matrix class, and records the time-stamp of each row in the matrix using POSIX. Print, plot, extraction, append, and related functionality are available. Feedback and suggestions are welcome. Giles Heywood
2004 Oct 25
1
copyright issues when package maintainer changes
I will be taking over as maintainer of the its package from Giles Heywood. The code was originally written while he was working at Commerzbank. I have added the header below to the top of the R source file to indicate the changes in the copyrights for the code. The package was originally released under GPL2. I have no experience with copyright issues, and would appreciate it if someone who does
2003 Nov 04
2
Object saved from 1.7.1, loaded in 1.8.0
I am having difficulty using in 1.8.0 an object created under 1.7.1. The following is a 'minimal example' of the issue. First the part in 1.7.1: > require("methods") [1] TRUE > setClass("foo",representation("vector",label="character")) [1] "foo" > x <- new("foo",1:2,label=LETTERS[1:2]) >
2003 Sep 18
0
non-numeric binary ops?
Has there been a recent change in the behavior of binary operators? In SparseM it was, until quite recently ok to do scalar multiplication but now, > A*4 Error in A * 4 : non-numeric argument to binary operator > 4*A Error in 4 * A : non-numeric argument to binary operator > A%*%A An object of class "matrix.csr" Slot "ra": [1] 1 1 1 Slot "ja": [1] 1 2 3
2003 Jul 11
2
unz()
I am having problems getting the unz() function to work as a connection to start reading a file... z <- unz("c:/temp/stoxx.zip", "close_tmi_components.txt", "r") readLines(z,2) yields the following problems: > z <- unz("c:/temp/stoxx.zip", "close_tmi_components.txt", "r") Error in unz("c:/temp/stoxx.zip",
2004 Mar 30
1
seq.POSIXt() bug not fixed in R 1.8.1 (PR#4558)
I am still experiencing problems with seq.POSIXt() missing off the last day of the series: > seq(as.POSIXct("2004-03-25"),as.POSIXct("2004-03-31"),by="DSTdays") [1] "2004-03-25 GMT Standard Time" "2004-03-26 GMT Standard Time" "2004-03-27 GMT Standard Time" [4] "2004-03-28 GMT Standard Time" "2004-03-29 GMT Daylight
2003 Feb 24
3
Test suites
I have a collection of functions, class definitions and methods which I would like to test systematically for their correctness after changes to their code, and also after major R revisions. I believe that the correct term for these systematic tests (as opposed to more informal tests) is a 'test suite'. Does anyone [apart from Pat Burns :-) ] have code, or templates, or specific
2003 Nov 06
2
GDB under windows
Does anybody have some simple instructions to get me going using the GNU debugger GDB under windows with R? The R Extensions manual mentions briefly debugging under unix, but I've seen seen GDB mention in the Bloodshed Dev C++ IDE so it should be possible to use it with R? Regards, John [Using R-1.8.0 under Windows NT 4.0]
2003 May 21
2
"locked environment"
I have a class defined as an extension to matrix: fooCLASS <- setClass("foo",representation("matrix")) and define a method for a generic function (no problem): setMethod("diff",signature(x="foo"),diff.foo <- function(x){x}) but I get a different behaviour for another generic function: setMethod("lag",signature(x="foo"),lag.foo
2003 May 19
3
how to run R as a daemon
Hi all, Using R a as a real-time application called by Php for a website, I would like to run one R process only, which would manage user connections. For the time each user who asks for an analysis causes a new R process to start, which is not suitable in prevision of many users. R needs about 30 seconds to run the script which makes the analysis. The problem is that this waiting time is n
2004 Feb 27
2
Packages in R & Java
Yes, lots of packages do use C/Fortran code ... it would be great if there were more packages that are "pure R" especially since the advent of S4 classes and namespaces. Is it worth suggesting that we create a designation "pure R" for packages that have no external source code and encourage more of these? Indeed, now the number of packages is so big could they be classified to
2004 Mar 03
1
match.call(), S4
I get different results from match.call(), according to whether a function is dispatched via S3 or S4. Specifically, when I use S4 dispatch in the following example, the match.call() result is of length 1 less than I expect. I need to add an extra comma to get the same results as in the S3 method. --------example setClass("foo",representation("matrix"))
2004 Jan 08
3
S3, S4, namespace
I have encountered an issue which I have been unable to resolve, involving an S3 generic (print) being declared S4 generic in a package, and the method being exported. This all works fine - the problem occurs when I try to import the method to another package. Here is the bit that works fine. ------------- #the .r file for package bar
2003 Jun 24
8
excel files and R
Greetings everyone, I am new at R. My questions is rather basic. Looking R manuals looks like there should be a way to read MS excel files into R. Could somebody tell me which library should I use for that? Thanks in advance Victor H. Marín Laboratorio de Modelación Ecológica Depto. de Ciencias Ecológicas, Fac. de Ciencias, Universidad de Chile Casilla 653 Santiago, Chile