similar to: choosing a random element from a vector

Displaying 20 results from an estimated 4000 matches similar to: "choosing a random element from a vector"

2001 Jul 10
1
Object finalization
I see some code in R to attach finalizers to external pointer references (Register[C]Finalizer). Anyone have an example of how to code the finalizer? R_RegisterCFinalizer accepts a C function, but I can't see how to get it to operate on the pointer, since the pointer is not passed to the function when its called. RegisterFinalizer takes an R closure, but how is it called from R (tried
2005 Oct 30
1
Help with Subtracting an effect from a Mixed Model
Hi Everyone, I posted a similar question about a week ago, but haven't gotten any replies -- I'm afraid that's because my previous question was too vague. Let me try again with a more specific question, and I hope someone can help. NOTE, I know I should be using the newer lme4 package, I just haven't had a chance to update my version of R yet, so the question below relates
2003 Apr 18
1
MCMCpack gelman.plot and gelman.diag
Hi, A question. When I run gelman.diag and gelman.plot with mcmc lists obtained from MCMCregress, the results are following. > post.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000, + thin = 10, verbose = FALSE, beta.start = NA, sigma2.start = NA, + b0 = 0, B0 = 0, nu = 0.001, delta = 0.001) > post1.R <- MCMCregress(Size~Age+Status, data
2012 Oct 17
3
Install rgdal, lazy loading error
Hi all, I have successfully made and installed both gdal, and proj.4, but still cannot get rgdal to be installed in R. I think i'm very close. I do not have root access, if that matters, i've installed everything locally. I'm using debian on a beowulf cluster. I call: install.packages("rgdal", .libPaths()[1], configure.args =
2002 Mar 22
1
name spaces?
I'm revisiting the R/S DBI package and was wondering if there is any plan to implement package name spaces in R/S. I've taken to the habit of prepending a few characters to function names in packages to avoid collisions, e.g., dbConnect(). An alternative would be DBI::connect() (s/::/preferred/) which in some ways I find more pleasing. Not having thought about it in detail, it seems pretty
2003 Sep 24
1
FS-corruption on ext3 with HTrees
Hi, I'm working with Prof. Zadok on versionfs, a stackable versioning file system. I face some problems with the unlink operation on ext3 with htree. On an unlink, I make a copy of the file (version/backup) and unlink the original file. But some files that have been unlinked are "linked back" to another file. For example, on deleting the file 'foo', the file itself is
2005 Aug 26
1
Pseudo-Voigt fit
Hi, I am sorry for this question, but I am trying to speed up an application.... I will need to fit many x-y data sets (input from text files) to 4-parameter Pseudo-Voigt peak function. Until now I used SigmaPlot macro to do it (enclosed just in case...) peaksign(q) = if(total(q)>q[1], 1, -1) xatymin(q,r) = xatymax(q,max(r)-r) [Parameters] a = if(peaksign(y)>0, max(y), min(y))
2000 Aug 31
2
plot(x,y,axes=F) (PR#650)
Full_Name: Kenny Ye Version: R-1.1.1 OS: Solaris 2.6 Submission from: (NULL) (129.49.6.133) when i use plot(x,y,axes=F), the axes and the box are still ploted. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2002 Jan 29
3
dimnames usage in ts (PR#1288)
Full_Name: Tim Keitt Version: 1.4 OS: Linux Submission from: (NULL) (129.49.19.70) I think this code in 'ts' is incorrect: if (is.matrix(data) || is.data.frame(data)) { nseries <- ncol(data) ndata <- nrow(data) dimnames(data) <- list(NULL, names) } since > x <- data.frame(matrix(rnorm(100),ncol=10)) > names(x) [1] "X1"
2003 May 02
2
stepAIC/lme (1.6.2)
Based on the stepAIC help, I have assumed that it only was for lm, aov, and glm models. I gather from the following correspondence that it also works with lme models. Thomas Lumley 07:40 a.m. 28/04/03 -0700 4 Re: [R] stepAIC/lme problem (1.7.0 only) Prof Brian Ripley 04:19 p.m. 28/04/03 +0100 6 Re: [R] stepAIC/lme problem (1.7.0 only) Prof Brian Ripley 06:09 p.m. 29/04/03 +0100 6 Re: [R]
1999 Feb 09
1
bug on cancor (PR#116)
When I use the function cancor of mva package, I found that it doesn't work when one of the matrix has only one column, or both have only one column. The function in Splus 5 with the same name works under those situations. The version of R I am using is 0.63.2 (released on Jan., 1999) on Solaris. Kenny Ye Assistant Professor Department of Applied Math and Statistics SUNY at Stony Brook
2016 Jul 26
2
[LLVMdev] Interprocedural use-def chains
Thanks for your reply. Yes, I was about to recurse over the use list of the argument in the called function. I did not want to pursue that because with this solution, I am going to implement the interprocedural part myself and was wondering if that was not already done. I was not also 100% sure that this will work for any type of arguments. If, based on your response, this is my only solution
2016 Jul 26
2
[LLVMdev] Interprocedural use-def chains
Hello, I have been using the USE class to access the use-def chains of different values. However, what I have noticed is that the set of users of a particular value is limited for the appearance of that variable in the current function. How can I get the interprocedural use of a particular value? For example, if a variable *a* is used as an argument in a function call *foo*, the USE analysis
2001 Mar 19
3
generic database access methods
I've been putting together a package that defined generic methods for database access. The packages is called "Rdbi." It borrows as much as possible from existing database packages / proposals. I'd like to start a discussion about the proposed interface. Here's what I've come up with so far: # # Rdbi: connectionMethods.R # dbConnect <- function(dbObj, ...)
2001 Apr 20
5
map projections
A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 905 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/20010420/61ada248/attachment.bin
2000 Jan 03
4
leaps
Hi, there, S+ has a function leaps which can be used for criterion based model selection. Is there an equivalent function in R? thanks in advance. Kenny Ye Assistant Professor Department of Applied Math and Statistics SUNY at Stony Brook Stony Brook, New York 11794-3600 (516)632 9344 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2001 Oct 04
3
Ordered factors and DBMS
Is there any way of preserving order of ordered factors when storing a table in PostgreSQL? I have been using PostgreSQL and the RPgSQL package to store a large table with answers such as "Strong disagreement", "Strong agreement", "Mild disagreement". "Mild agreement". When reading the table, such answers are turned into factors, apparently in
2012 Nov 05
2
[LLVMdev] Unable to Run Inline Asm with MCJIT
Hi, I am first year PhD student at Stony Brook University. For one of my projects I am trying to JIT compile and run a C program containing inline assembly using MCJIT but I am not able to. I have cloned and build LLVM-3.1. Below are more details. Arch : x86 OS : Linux ubuntu 2.6.35-22-generic Sample program : test_inline_asm.c ------------------- #include <stdio.h> int main(){ int
2001 Aug 01
3
partial correlations
Howdy! I need to calculate partial correlations and I just can't find out how to do that with R. Can anybody help? Ragnar -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 !)
2012 Aug 25
2
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
2012/8/25 Iaroslav Markov <ymarkov at cs.stonybrook.edu>: > Can't you do it by performing some analysis on CFG? You can traverse that structure with BFS. And after that for all the BB you have visited more than once, you try to find a parent that has a branch instruction as a terminator. Additionally you ensure that there are no BB with branches as terminators on your way. If such