Dear all,
Now that R has OpenMP facilities, I'm trying to use it for my own package but
I'm still wondering if it is safe to use random number generation within a
OpenMP block. I looked at the R writing extension document both on the OpenMP
and Random number generation but didn't find any info
Dear list,
I found a strange behavior of the graphic display when using bquote to set a
title to a plot. The problem arise when you manually resize the graphic window
using the mouse. It happens on both quartz and x11 devices. Here's a
reproducible example:
par(mfrow = c(1,3))
for (i in 1:3){
Dear R-core team,
I think I found a small inconsistency in the boxplot function. I don't want to
post it as a bug since I'm not sure this might be considered as one according
to the FAQ --- and this is not a major problem. Don't hesitate to tell me if
I'm wrong.
If you try to do a boxplot on a
Dear Etienne,
You probably want to create a zzz.R file in the /mypkg/R/ folder which
is just
.First.lib <- function(lib, pkg){
library.dynam("MyPkgName", package = pkg, lib.loc = lib)
return(invisible(0))
}
This would ensure that your shared library will be lo
rdoch wrote:
> > On 10/10/2009 8:07 AM, Mathieu Ribatet wrote:
> >> Dear list,
> >>
> >> I got an automatic email complaining than some of my packages didn't
> >> pass 'R CMD check' for R-2.10.0 alpha anymore. Both of them make use of
> >> t
Dear list,
I got an automatic email complaining than some of my packages didn't
pass 'R CMD check' for R-2.10.0 alpha anymore. Both of them make use of
the "cases" LaTeX environment.
Inspecting the log outputs I got:
LaTeX errors when creating PDF version.
This typically indicate
Dear Fabio,
The problem is that L[k,1:(r-1)] is not anymore a matrix but a vector.
Hence when you do t(L[k,1:(r-1)]) you get a matrix with only one row
while I think you expected one column instead. You can see this feature
with a simpler example like the following one:
x <- runif(10)
Dear Carlos,
>From your check results:
cbc.data <- cbc.read.table( system.file("data",
"cbc.test.data.txt", package = "colbycol"), sep = "\t" )
Warning in file(file, "r") :
cannot open file '0001': No such file or directory
I think you're t
An other possibility is to insert new features in your package once you
feel pretty confident with your new code. "R CMD SHLIB myfile.c" will
build the SHared LIBrary and then load it in R by invoking
"dyn.load("myfile.so")" in an R console.
Once you're satisfied with your code, just do as you did
I guess that having something like this
> q()
> Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]:
where "e" means Editing the path should be clear enought, isn't it?
Best,
Mathieu
Le vendredi 05 juin 2009 à 14:36 +0200, Wacek Kusnierczyk a écrit :
> Duncan Murdoch wrote:
> > On 05/06/
This is indeed details in Writing R Extensions. You should have a closer
look at sections 5.9.3 and 5.9.4. Look at the pieces of C code, they
will help you a lot.
cheers,
Mathieu
Le mercredi 03 juin 2009 à 00:44 +0200, Kynn Jones a écrit :
> I'm in the process of coding a parser (in C) to genera
To the best of my knowledge this is not a bug. According to FAQ 3.3.3
"Numeric constants with no fractional and exponent (i.e., only integer)
part are taken as integer in S-Plus 6.x or later, but as double in R."
You can see it by invoking
>storage.mode(1)
[1] "double"
Hence, if you really want t
Dear Ick Hoon Jin,
Your problem is probably due to a misspecification in memory allocation
within your C code. To solve this you can:
* check by yourself whenever there is C memory allocation - by the
way I think it's best to use R memory allocation i.e. R_alloc
* use valgrind
I'm not sure this will work under MacOS but you should try to run R from
a shell and see any informative message displayed in it.
Cheers,
Mathieu
* it might be useful to give us some details about the code you ran and
caused the issue.
Le lundi 02 mars 2009 à 17:15 +0100, marycme...@mac.com a éc
You might have a look at the "Writing R Extensions" manual - especially
valgrind and/or gdb.
By the way, your error is probably due to array size problem - i.e. tmp
is of size n and you call tmp[n+1] for example. Valgrind will detect in
automagically for you.
Best,
Mathieu
Le lundi 09 février 20
Hi Christophe,
The problem might be that you used %d when printing. I guess that your
variables dist and tmp are double so you have to use %f instead.
Best,
Mathieu
Le dimanche 08 février 2009 à 23:37 +0100, Christophe Genolini a écrit :
> Hi the list,
>
> I need to include some C code in R, bu
0x805B3E7: R_ReplConsole (main.c:306)
==18032==by 0x805B6D7: run_Rmainloop (main.c:966)
==18032==by 0x8058F80: main (Rmain.c:33)
Error in .Call("XXX") : C symbol name "XXX" not in load table
Have you named the file u.c or u.cc?
Cheers,
Martin
Mathieu Ribatet wrot
Hi Martin,
I wasn't able to compile your files. Replacing "extern "C" SEXP XXX();"
by "SEXP XXX();" solve the issue and I got no message from valgrind -
I'm not sure this is what you really want to do though.
I hope this might help.
Cheers,
Mathieu
schlat...@math.uni-goettingen.de a écrit :
Dear Simone,
Did mean that the legend (text and/or box) overlap with the Normal
density? If so then I think there's no problem as the legend is placed
where you told R to do. And R won't check (for you) if it will overlap
or not with pre-existing graphical elements.
On my computer, I got the
Dear Terry,
One way to locate which file is wrong - surely not the most brillant
way! You could do an R script that sources each of your .R files within
a "for (file in file.names)" loop.
When R will stop, it will indicate which file has a wrong syntax and
more info.
Cheers,
Mathieu
Terry T
Just a suggestion. I googled for your error message you got e.g. "make
... error 127" and I got
Yeah, error 127 indicates that make can't find a program that it needs to
run a command. My guess would be that she doesn't have g++ installed
(some distributions package it separately from gcc so it
Ok, please consider it as a bad call.
Thanks for your answers.
Best,
Mathieu
Prof Brian Ripley a écrit :
On Fri, 8 Aug 2008, Mathieu Ribatet wrote:
Dear list,
Here's a suggestion about the different optimization code. There are several
optimization procedures in the base package (
Dear list,
Here's a suggestion about the different optimization code. There are
several optimization procedures in the base package (optim, optimize,
nlm, nlminb, ..). However, the output of these functions are slightly
different. For instance,
1. optim returns a list with arguments par
est.eigen.value
if the smallest eigen value is smaller than eps.
Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")
Mathieu Ribatet wrote:
Thanks Ben for your tips.
I'm not sure it'll be so eas
Thanks Ben for your tips.
I'm not sure it'll be so easy to do (as the non-feasible regions depend
on the model parameters), but I'm sure it's worth giving a try.
Thanks !!!
Best,
Mathieu
Ben Bolker a écrit :
Mathieu Ribatet epfl.ch> writes:
Dear list,
I'm c
Dear list,
I'm currently writing a C code to compute the (composite) likelihood -
well this is done but not really robust. The C code is wrapped in an R
one which call the optimizer routine - optim or nlm. However, the
fitting procedure is far from being robust as the parameter space
depends
Dear Rense,
The way you included your pdf file in your package is appropriate.
Normally, when invocking "help.start()" and going to your package link,
you should have two links overview and directory where your pdf file
should be located.
Best,
Mathieu
Rense Nieuwenhuis a écrit :
Deal all,
Have you create a zzz.R file in the R folder? I think your issue is
related to this...
Example of the zzz.R file:
".First.lib" <-
function(lib, pkg)
{
library.dynam("your_pkd_name", package = pkg, lib.loc = lib)
return(invisible(0))
}
This is required when you have C/Fortran code. See the wr
Dear all,
I'd like tweaking the ... arguments that one user can pass in my
function for fitting a model. More precisely, my objective function is
(really) problematic to optimize using the "optim" function.
Consequently, I'd like to add in the "control" argument of the latter
function a "n
Why don't you consider a "while" loop e.g.
while (Pij < 0)
##Then you resample according to your code
Nadeem Shafique a écrit :
Respected All,
I am writing a program in R and facing some problem with applying "if statment".
Program first draw random numbers from bivariate normal distribution
en garbage-collected before use.
- memory corruption, most often by writing outside array bounds.
See the chapter in 'Writing R Extensions' about this, and if possible
make use of valgrind.
On Fri, 9 May 2008, Mathieu Ribatet wrote:
Dear all,
I'm currently experiencing big troub
Dear all,
I'm currently experiencing big troubles with my C code called by .Call
in a R function.
I know this may not be the right place for such things but these errors
are driving me crazy. And I hope other people may have already
experienced these problems so that they could give me go
> I tried installing r on my computer, and didn't manage to get the program
> running.
> After having installed littler, typing r into the bash results in following
> message:
>
> r: symbol lookup error: r: undefined symbol: R_Visible
>
Did you invoke "r" or "R" because it is totally different
> I tried installing r on my computer, and didn't manage to get the program
> running.
> After having installed littler, typing r into the bash results in following
> message:
>
> r: symbol lookup error: r: undefined symbol: R_Visible
>
Did you invoke "r" or "R" because it is totally different
>> I definitely do agree with you.
>> Basically, I see two different ways to proceed:
>>
>>1. one could first check if there are any 0 in the vector and then
>> return 0 without computing the product
>>
>
> That would fail for prod(0,Inf), which should return the same
> thing as 0*I
I definitely do agree with you.
Basically, I see two different ways to proceed:
1. one could first check if there are any 0 in the vector and then
return 0 without computing the product
2. or convert prod(x1, x2, x3) in prod(c(x1, x2, x3))
Both approaches are similar except for the pa
Dear list,
I'm currently trying to write a new R package to model spatial extremes.
In particular, for a model fitting procedure, I'd like to use flexible
response surfaces (like linear models, splines, ...) for the parameters
of my model. Following this idea, I'd like to allow "a new
inte
Has your environment variable path been set correctly?
It's been a while that I'm not using R under windows but remember had
experienced the same error. I remember that I had to put many paths as
environment variable to build R packages properly.
Best,
Mathieu
[EMAIL PROTECTED] a écrit :
> Hi
Has your environment variable path been set correctly?
It's been a while that I'm not using R under windows but remember had
experienced the same error. I remember that I had to put many paths as
environment variable to build R packages properly.
Best,
Mathieu
[EMAIL PROTECTED] a écrit :
> Hi
Well, you just have to use "&", "|" instead of "&&", "||".
Best,
Mathieu
Yuan Jian a écrit :
> Hello there,
>
> I got a small problem about logical calculation:
> we can get a sequene from a+b as below:
>
> > a<-c(1,2)
>
>> b<-c(3,4)
>> a+b
>>
> [1] 4 6
>
> but when th
Brian Ripley a écrit :
> On Sun, 6 Apr 2008, Mathieu Ribatet wrote:
>
>>Dear list members,
>>
>> I've got a small question on matrix multiplications in a C code. Because
>> of a really cpu demanding likelihood, I had to use a C code within an R
>> functi
Dear list members,
I've got a small question on matrix multiplications in a C code. Because
of a really cpu demanding likelihood, I had to use a C code within an R
function wrapper. I'm pretty sure that there is already one good code
for matrix multiplication in C - maybe in the R source co
42 matches
Mail list logo