similar to: R and kron

Displaying 20 results from an estimated 4000 matches similar to: "R and kron"

1999 Aug 18
2
diag()
I would like to suggest a slight modification to diag(). In the case where x is a matrix with both row names and column names the same, it would be reasonable if the resulting vector also had those names. I often use diag() on variance matrices, where this modification is helpful. The modification requires replacing if (is.matrix(x) && nargs() == 1) return(c(x)[1 +
1999 Nov 04
2
New codes() methods
Hi Everyone, Can I suggest a couple of new `codes' methods. I know codes is a bit dodgy (at least, according to the comments in codes.factor), but for what it's worth I like to extract codes from data frames of factors, for which the following two functions (which operate recursively) are helpful: "codes.default" <- function(x) { if (is.list(x)) lapply(x, codes)
1999 Mar 25
1
plot.formula and pch= (PR#149)
I'm not sure exactly where to point my finger with this one, but there is a nasty surprise to the unsuspecting user. There is no check on the length of the vector passed in the pch= argument to plot, it is just recycled as necessary: plot(1:10,1:10,pch=1:2) gives alternating circles and triangles. The nasty bits come up especially with plot.formula: x<-1:10;y<-1:10
1999 Nov 03
1
Dimnamenames (PR#257)
I've just started digging into Andreas's old report: > a <- array(0,c(2,2,2)); > dimnames(a)<-list(hansi=1:2, pepi=c("a","b"), karli=3:4) > dimnames(a[,,1]) # losing component names [[1]] [1] "1" "2" [[2]] [1] "a" "b" Now, this would be fairly easily fixed (I think) which would also make it compatible with S3.
1999 Mar 10
2
.Alias and memory
In an effort to encapsulate my dependence on class in order to deal with oldclass/class in Splus I defined the functions tfclass <- class "tfclass<-" <- function(x, value){ class(x) <- value ; x } and also the function classed <- function(x, cls) {class(x) <- cls; x} This last allows me to end a function definition with ... classed(somecalc,
1999 Dec 07
4
Finding indices with a certain property
I want the indices i for which x[i] < 0 (say): > x <- c(1, -1, 3, 3, -2) > where.negative(x) [1] 2 5 Surely where.negative is something simple, but how? G?ran -------------------------------------------------------------- G?ran Brostr?m Department of Statistics tel: +46 90 786-5223 Ume? University fax: +46 90 786-6614 S-90187 Ume?, Sweden
1999 Dec 07
2
Reply to list policy
I wonder if it isn't time to change the reply-to-list policy of R-help and adopt the alternative convention of replying to the author and asking him/her to summarize to the list. Recently R-help has been too busy for me to keep up with. There were quite a few identical responses in the "Finding indices with a certain property" thread, rather than an extended discussion. I think
1999 Jan 22
1
backsolve... --> class()es for special matrices ?
>>>>> "JonR" == Jonathan Rougier <J.C.Rougier@durham.ac.uk> writes: JonR> ... By the way, I have `solve' JonR> methods for triangular matrices and variance matrices -- would JonR> you be interested? { Jonathan, I hope it's okay if I CC this to R-devel; this must be of a wider interest } Ye.e..s; for triangular ones,
1999 Dec 21
2
generating a sequence
Hi everyone I'm trying to generate a vector of the form a <- c(1,2,3,4,1,2,3,1,2,1) where n = 5 in a general way, where n can be any positive integer. I've run out of ideas. Does anyone have any suggestions? Thanks Karen Karen Kotschy Centre for Water in the Environment University of the Witwatersrand Johannesburg Tel: 011 716-2218
1999 Dec 21
2
generating a sequence
Hi everyone I'm trying to generate a vector of the form a <- c(1,2,3,4,1,2,3,1,2,1) where n = 5 in a general way, where n can be any positive integer. I've run out of ideas. Does anyone have any suggestions? Thanks Karen Karen Kotschy Centre for Water in the Environment University of the Witwatersrand Johannesburg Tel: 011 716-2218
1999 Jun 14
2
Include file changes
I think we are long overdue for a revision of the header files used in R. This is going to be especially important for a clean build of the CORBA and R/Java stuff which I have been looking over Duncan's shoulder at. It will also let us integrate some of the features Duncan has had to find creative ways around and also to let us integrate things like the PROBLEM buffer problem. I would propose
1999 Sep 20
3
image legend
Dear R users, Does anyone have a function for putting a legend on an image plot? I couldn't locate an R equivalent of image.legend....has anyone written such a thing? kind regards andy --------------------------------------------------------------------- J. Andy Royle, U.S. Fish and Wildlife Service - Office of Migratory Bird Management; 11510 American Holly Drive , Laurel, MD
1999 Mar 18
2
e1071 and netpbm
Having compiled and successfully installed e1071 on a previous machine (and run under 0.62.4) I want to compile it on a new machine to run under 0.63.3 but the loader can't find netpbm - both machined are RH5.2 Linux installations. I have some quite old netpbm's on a CD but none more recent and I certainly didn't install them on my old machine. I can't locate or rpm -q or rpm
1999 Mar 18
2
e1071 and netpbm
Having compiled and successfully installed e1071 on a previous machine (and run under 0.62.4) I want to compile it on a new machine to run under 0.63.3 but the loader can't find netpbm - both machined are RH5.2 Linux installations. I have some quite old netpbm's on a CD but none more recent and I certainly didn't install them on my old machine. I can't locate or rpm -q or rpm
1999 Jan 15
1
Some outer() suggestions
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-342241519-916419809=:25543 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: <Pine.GSO.3.96.990115171305.25543M@laplace> I attach outer.tar.gz which contains
1999 Apr 06
2
Funny warning message
Hi Sometimes (and I haven't yet found out what causes it) I get a message: Warning: ingnored non-function "t" I think it may be either when I have done a Ctl-C to break in or I may have inadvertently named a variable after one of the many system or other functions. I have seen names other than "t". Anyway, the only way I can get rid of it is to exit and restart. I
1998 Nov 13
3
SuSE package
Hi Is there a SuSE binary package for R 0.64? John -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
1999 Aug 25
2
Error in ?text (PR#256)
Just a minor point, but the adj argument in ?text is described wrongly (0.64.1). Perhaps the following might be added to the details. Values of 0, 0.5, and 1 specify left/top, middle and right/bottom, respectively. The default is for centred text, ie \code{adj = c(0.5, 0.5)}. Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of
1999 Mar 26
1
Array indexing
I want to pick out a single member for each row of a matrix according to an indexing vector and I would have thought this was a simple operation. Is it that I am too stuck in Fortran for my own good (so wots rong with fortran?), but is there a better way of doing what to me is intuitive but gives completely the wrong answer. The following result occurs: a<-kronecker(1:4,t(11:15)) # Gives
1999 Jun 17
0
save.image()
Would it be reasonable to suggest adding an `all' flag to save.image(), i.e. "save.image" <- function (f = ".RData", all.names = F) eval(substitute(save(list = ls(all.names = all.names), file = f)), .GlobalEnv) I only ask because I keep losing my .First() function. I would like to start R in a particular directory and have it configure according to the First()