similar to: An example of using rJava

Displaying 20 results from an estimated 700 matches similar to: "An example of using rJava"

2012 Jan 30
1
Need to Write a Code that can find the molecular weight of various compounds
Hi! Just started working at a lab and have only minimal experience with R. I was wondering if there was a way to write a code that would intake a data set of chemical compounds (ex: H2O, CH3) and be able to give an output column of the molecular weight? I tried some really basic coding to try to work with a being a matrix of data with the assigned variables. if (A<-'H')
2006 Nov 06
0
rJava: java.lang.OutOfMemoryError
Hy, In my case I just invoked as root (on a linux box) the command R CMD javareconf and checked if my system and root vm did match the version of the user vm. After this the command .jinit(parameters=c("-Xmx512m","-Xmx128m")) could be executed without errors. I got this information from http://www.rosuda.org/JGR/down.shtml -- Hi, Has anybody encountered the following
2009 Feb 07
1
vignettes are installed but not viewable?
Hi, I have a package for which I'm writing a vignette. The vignette looks fine as indicated by R CMD check. However after installing the package (in my personal R library location) doing vignette('rcdk') says Warning message: vignette 'rcdk' *not* found But I can see the PDF file located under rcdk/doc in the R library directory. The header of the Rnw file is %
2005 Jul 20
2
Issues with convolve
We obtained some disturbing results from convolve() (inaccuracies and negative probabilities). We'll try to make the context clear in as few lines as possible... Our function panjer() (code below) basically computes recursively the probability mass function of a compound Poisson distribution. When the Poisson parameter lambda is very large, the starting value of the recursive scheme ---
2007 Feb 06
0
convolve: request for "usual" behaviour + some improvements + some fixes
To add to the wish-list for "convolve": For modeling processes that decay exponentially in time, e.g., fluorescence, it is desirable to have a function that convolves an arbitrary vector with an exponential using an iterative method. In the TIMP package (which won't be on CRAN till R 2.5.0 is official, but is for now at www.nat.vu.nl/~kate/TIMP) we implemented this special-purpose
1999 Nov 18
1
convolve bug?
I have been experimenting with convolve(). What I know about convolution I learned from engineering (they call this stuff linear systems theory), not statistics, so maybe this is all just a matter of different conventions. BUT I notice very weird things with convolve(). 1. First example, from the classic Bracewell The Fourier transform and its applications, chap 3 (p.32 in 2nd edition): {2 2 3 3
2012 Mar 15
4
replicating C example from the Extensions Manual problem
Dear R People: Here is something that I am sure is very simple. I'm just trying to re-create the C convolution example in the Extensions manual. Here is the subroutine: void convolve(double *a, int *na, double *b, int *nb, double *ab) { R_len_t i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j < *nb; j++) ab[i + j] += a[i] *
2011 Aug 11
1
.C and .Call: convolve example not working
Dear R users, I want to call C code via the .C or .Call interface. This works fine with integer values but using doubles the array received in C will be set to zeros. I have tried the convolve examples (Writing R extensions, chapter 5.2) and still the resulting array consists of zeros. My code (shortened for my purposes. Original did not work either):
2006 Jan 25
2
how to test robustness of correlation
Hi, there: As you all know, correlation is not a very robust procedure. Sometimes correlation could be driven by a few outliers. There are a few ways to improve the robustness of correlation (pearson correlation), either by outlier removal procedure, or resampling technique. I am wondering if there is any R package or R code that have incorporated outlier removal or resampling procedure in
2005 Oct 26
1
Borland C++ and [R] dyn.load() for windows
Hi, I compiled a C program file on Borland C++ 5.5 compiler to get one dll output (as instructed in the file readme.package). The C program file is just the example on page 31 of "writing R extensions": void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j
2007 Feb 02
1
Inaccuracy in ?convolve
Hi, Man page for 'convolve' says: conj: logical; if 'TRUE', take the complex _conjugate_ before back-transforming (default, and used for usual convolution). The complex conjugate of 'x', of 'y', of both? In fact it seems that it takes the complex conjugate of 'y' only which is OK but might be worth mentioning because (1) conj=TRUE is the
2013 Jun 23
1
stats::convolve documentation enhancement
Hi, the function stats::convolve does not mention efficient usage of the underlying FFT algorithm, such as (a) if type="circular", then length(x)=length(y) should have many factors (e.g. length(x) = length(y) = 2^n) (b) if type="open" or "filter", then length(x)+length(y)-1 should have many factors (e.g. length(x)+length(y)-1 = 2^n) In particular the latter may
2011 May 18
1
Convolution confusion:
Hi, I'm new to R, and I'm a bit confused with the "convolve()" function. If I do: x<-c(1, 2, 3) convolve(x, rev(x), TRUE, "open") = 9 12 10 4 1 But I expected: 3 8 14 8 3 (like in Octave/MATLAB - conv(x, reverse(x)) ) 3 2 1 x 1 2 3 = 3 2 1 0 6 4 2 0 0 9 6 3 = 3 8 14 8 3 The thing is, that "convolve(x, x, TRUE, "open")" works. For me
2007 Dec 19
1
strange timings in convolve(x,y,type="open")
Dear R-ophiles, I've found something very odd when I apply convolve to ever larger vectors. Here is an example below with vectors ranging from 2^11 to 2^17. There is a funny bump up at 2^12. Then it gets very slow at 2^16. > for( i in 11:20 )print( system.time(convolve(1:2^i,1:2^i,type="o"))) user system elapsed 0.002 0.000 0.002 user system elapsed 0.373
2006 Apr 12
0
headerfile translation to Delphi (Pascal) completed
Hi, I am happy to announce that I finished the translation of almost all LGPL'ed R headerfiles to Delphi. As a test I did several demos which basically contain delphized versions of all the examples of chapter 5 in "Writing R Extensions". Please have a look in the attachments for details (DemosAndHeaders.txt), more information (Readme.txt) and an example of how it looks
2001 Jun 04
1
2D convolution
Dear all, I have an image that I need to filter, and so I'm looking for a method to convolve it with a matrix. If I understood the docs for convolve correctly, it only works in 1D (and I have tried to convolve, it didn't look good). So, I wondered if anybody have implemented 2D convolution in R, or have any good advices to share (beyond having a look at mvfft), before I go hacking?
2007 May 25
1
iplots problem
Hi. I try to load iplots using the following commands > library(rJava) > library(iplots) but then I get the following error: Error in .jinit(cp, parameters = "-Xmx512m", silent = TRUE) : Cannot create Java Virtual Machine Error in library(iplots) : .First.lib failed for 'iplots' What do I have to do to correct this? Thanks -- View this message in context:
2010 Nov 01
0
function: colvolve
Hi list, I have a problem to solve which I believe I shoudl use the convolve to solve it, but I could not figure out how to do it. I got mydata, which is a dataframe which has 7 locations, each location has a longitude,latitude and a value. considering a step of 0.5 degree for longitudes and latitudes, I got 15 points for longitude and 15 points for latitude. Then I created a grid, mygrid, which
2000 Jan 28
0
convolution bug (PR#408)
Full_Name: Bill Simpson Version: 65.1 , 0.90.1 OS: Linux Submission from: (NULL) (193.62.250.209) I reported this on r-help, but here is official bug report. The present convolve() does not do convolution by default. Its default behaviour is correlation. This is a bug. The default argument conj should be set to FALSE. The zero-padding should be on the right for linear convolution (don't
2004 Apr 07
1
loading c code in windows ambient
Dear all, I'm studing how to include .c code in my .r functions . In the R-exts.pdf manual I have found the following code. At one point the author write "called from R by"... How can I load a .c file on R? ( I am using a xp windows as so.) Thank you ale void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++)