Displaying 20 results from an estimated 9000 matches similar to: "Using packages built in linux in windows"
2010 Sep 06
1
c++ equivalent switch statement?
Is there a c++ equivalent switch statement in R?
--
Rajesh.J
[[alternative HTML version deleted]]
2010 Aug 14
1
Creating list from a long vector
Stupid question, but its been a long night.
If I have a long vector how can I turn it into a list of the same length
x<-rep(seq(1,100,by=1),each=10)
[[alternative HTML version deleted]]
2010 Aug 16
2
Random Number Generators and Sample
I am trying to get documentation about the random number generator used in
"sample". The help for sample does not mention it. Can anyone point me in
the right direction.
Thanks
[[alternative HTML version deleted]]
2010 Aug 20
1
Rserve (Anyone?)
REXP has an asBytes() method. Will this capture the output of an R plot
function if a proper graphics device is used? It appears R insists on
sending plot output to a file. Kind of strange since it insists on loading
all your data into memory before it can do anything.
If so then does anyone know what this would be? I prefer png or jpeg.
Example:
c is an RConnection
REXP r =
2010 Aug 20
1
R and Java
Hi folks,
Maybe that is not the best place to ask, but I 'd like some of you could
help me...
I'm using jri to run R commands under Java, by its examples I can eval
expressions, returning single values or vectors to my Java variables. But, I
would like to know how to assign the values of a Java vector (like: double
x[] = {1.7 , 2.8 , 3.4}; ) to a R variable, so I can eval a function
2010 Sep 15
3
characters in a string
Hi,
I need to check if a string "<rh>a,b,c,d<rh>" is delimited by two "<rh>" 's as efficiently as possible(I need to do this a lot of times) and return TRUE. Can someone suggest a good technique?
[[alternative HTML version deleted]]
2010 Sep 28
1
How to convert SEXP to double
Hello All,
A simple question.
I get some return from the R in my C++ program (via Rcpp package). The
result come, as SEXP and it should be a simple numeric variable.
How to convert it to double?
The code, what i use:
stringstream ss;
ss << "p <- predict(fit_ar11, n.ahead = 2, doplot=FALSE);"
<< "p$pred[1]";
SEXP ans;
int iRet =
2010 Sep 26
2
get absolute file path
Hello,
I get a value which stores a relative file name. (I get it from another
function, which I don't want to change.)
e.g.
> fileName <- "../data/2010-08.csv";
Is it possible to get the absolute file path out of this value?
(e.g. /home/sebastian/documents/data/2010-08.csv)
Kind regards,
Sebastian
2010 Aug 13
2
cacheSweave / pgfSweave driver for package vignette
Dear list,
I wish to use a specific driver to process an sweave document in the
inst/doc directory of a package. Specifically, I would like to use
either cacheSweave or pgfSweave to speed up the creation of the
vignette which requires lengthy computations. The same request would
also apply to the highlight driver, to provide syntax highlighting of
R chunks.
In "writing R extensions" I
2010 Aug 13
2
cacheSweave / pgfSweave driver for package vignette
Dear list,
I wish to use a specific driver to process an sweave document in the
inst/doc directory of a package. Specifically, I would like to use
either cacheSweave or pgfSweave to speed up the creation of the
vignette which requires lengthy computations. The same request would
also apply to the highlight driver, to provide syntax highlighting of
R chunks.
In "writing R extensions" I
2013 Oct 10
1
Rcpp and mclapply
Dear all,
I have an R script that uses Rcpp, and I have been trying to parallelize
it using mclapply (I tried with the multicore and the parallel library)
Sometimes (not always, interestingly), the CPU use for each core drops,
usually so that the total over all cores reaches 100%, i.e., as fast as if
using just one single core fully. I tried my code directly from within
emacs, and also using a
2018 Mar 30
2
getting all circular arrangements without accounting for order
Jeff,
I wanted to let you know that your function is faster than generating the directional circular permutations and weeding.
Here is the time for n = 10. I compared with just doing the permutations, there is no point in proceeding further with the weeding since it is slower at the start itself.
system.time(directionless_circular_permutations(10))
user system elapsed
1.576 0.000
2018 Mar 30
3
getting all circular arrangements without accounting for order
Thanks!
Yes, however, this seems a bit wasteful. Just wondering if there are other, more efficient options possible.
Best wishes,
Ranjan
On Thu, 29 Mar 2018 22:20:19 -0400 Boris Steipe <boris.steipe at utoronto.ca> wrote:
> If one is equal to the reverse of another, keep only one of the pair.
>
> B.
>
>
>
> > On Mar 29, 2018, at 9:48 PM, Ranjan Maitra
2018 Mar 30
0
getting all circular arrangements without accounting for order
New function below is a bit faster due to more efficent memory handling.
for-loop FTW!
directionless_circular_permutations2 <- function( n ) {
n1 <- n - 1L
v <- seq.int( n1 )
ix <- combinations( n1, 2L )
jx <- permutations( n-3L, n-3L )
jxrows <- nrow( jx )
jxoffsets <- seq.int( jxrows )
result <- matrix( n, nrow = factorial( n1 )/2L, ncol = n )
k
2018 Mar 30
0
getting all circular arrangements without accounting for order
I don't know if this is more efficient than enumerating with distinct
directions and weeding... it seems kind of heavyweight to me:
#######
library(gtools)
directionless_circular_permutations <- function( n ) {
v <- seq.int( n-1 )
ix <- combinations( n-1, 2 )
jx <- permutations( n-3, n-3 )
x <- lapply( seq.int( nrow( ix ) )
, function( i ) {
Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal error has occurred. Please se
2013 Apr 23
3
Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal error has occurred. Please se
Hi guys
when i''m doing bundle install i got this type of error
whats this?
please help me.
rajesh@rajesh:~/workspace/Cybermedia_Test$ bundle install
Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal
error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
2012 Jan 28
1
Compiling R code to native code?
Simple question: is there a way to compile R scripts to native code? If not is there anything else that might improve speed? I'm not even sure that R compiles internally to byte code or not. I assume it does since all modern languages seem to do this. Maybe there's a JIT compiler? Yes, I have searched Google and get lots of stuff that's seems confusing. I just want to know what
2010 Dec 03
1
Error using Rcpp under windows xp
Hi,
I am a newbie to Rcpp packages, and got problems in having basic set-ups for
Rcpp under windows xp. Here is the list I have done.
1) installed Rtools and have no problem in compiling .c file.
2) installed Rcpp packages
3) set enviroment variables 'path' to make C:\Program
Files\R\R-2.12.0\library\Rcpp\include\ searchable
The sample C++ code I used is from the original website:
2010 Aug 05
1
Sciviews-K -- object 'httpdPort' not found
Hi,
I'm trying to install Sciviews-K on Linux Ubuntu 9.10 (karmic) but I'm not able to establish the connection between Komodo and R. Here;s the error I get, plus some diagnostic info:
R version 2.9.2 (2009-08-24)
R is SciViews ready!
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'httpdPort' not found
> ls()
[1] "svStart"
> Sys.info()
2010 Aug 10
1
Identifying integers (as opposed to real #s) in matrix
Is there a way to identify (for subsequent replacement) which rows in a
matrix are comprised entirely of *integers*? I have a large set of
*nx3 *matrices
where each row either consists of a set of 3 integers or a set of 3 real
numbers. A given matrix might looks something like this:
[ ,1] [ ,2] [ ,3]
[1, ] 121.0000 -98.0000 276.0000
[2,