Displaying 20 results from an estimated 7000 matches similar to: "How to add make option to package compilation?"
2017 Sep 15
2
How to add make option to package compilation?
On 15 September 2017 at 14:13, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:
> On 15/09/2017 8:11 AM, Martin M?ller Skarbiniks Pedersen wrote:
>
>> Hi,
>>
>> I am installing a lot of packages to a new R installation and it takes
>> a
>> long time.
>> However the machine got 4 cpus and most of the packages are written in
>> C/C++.
2017 Sep 15
0
How to add make option to package compilation?
In line
On 15/09/2017 13:30, Martin M?ller Skarbiniks Pedersen wrote:
> On 15 September 2017 at 14:13, Duncan Murdoch <murdoch.duncan at gmail.com>
> wrote:
>
>> On 15/09/2017 8:11 AM, Martin M?ller Skarbiniks Pedersen wrote:
>>
>>> Hi,
>>>
>>> I am installing a lot of packages to a new R installation and it takes
>>> a
2017 Sep 15
0
How to add make option to package compilation?
On 15/09/2017 8:11 AM, Martin M?ller Skarbiniks Pedersen wrote:
> Hi,
>
> I am installing a lot of packages to a new R installation and it takes a
> long time.
> However the machine got 4 cpus and most of the packages are written in
> C/C++.
>
> So is it possible to add a -j4 flag to the make command when I use the
> install.packages() function?
> That
2017 Aug 14
4
Help creating the IBM Randu function
Dear all,
I am trying to learn functions in R and 3D plotting so I decided to try
to plot
the famous bad PRNG Randu from IBM(1).
However something is not correct in the function I have created.
First I define the function RANDU like this:
> RANDU <- function(num) { return (65539*num)%%(2^31) }
and test that it works for a seed of 1:
> RANDU(1)
[1] 65539
but if I want the next
2018 Jan 17
3
roxygen2 error - x$tag operator is invalid for atomic vectors
Hi,
I am trying to create my first R package.
I will later today put the files on Github.
However I gets this error and I can't find any reason for it:
R> roxygen2::roxygenise()
First time using roxygen2. Upgrading automatically...
Error in x$tag : $ operator is invalid for atomic vectors
R>
Any ideas?
Regards
Martin M. S. Pedersen
[[alternative HTML version deleted]]
2017 Dec 03
5
Rcpp, dyn.load and C++ problems
Hi,
I have written a small C++ function and compile it.
However in R I can't see the function I have defined in C++.
I have read some web-pages about Rcpp and C++ but it is a bit confusion
for me.
Anyway,
This is the C++-code:
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
List compute_values_cpp(int totalPoints = 1e5, double angle_increment =
0.01, int radius =
2017 Aug 14
0
Help creating the IBM Randu function
Please look at ?datasets::randu
for David Donoho's translation of RANDU into R.
On Mon, Aug 14, 2017 at 12:49 PM, Martin M?ller Skarbiniks Pedersen
<traxplayer at gmail.com> wrote:
> Dear all,
>
> I am trying to learn functions in R and 3D plotting so I decided to try
> to plot
> the famous bad PRNG Randu from IBM(1).
> However something is not correct in the
2017 Aug 14
0
Help creating the IBM Randu function
Hi Martin,
The corrected function would be
RANDU <- function(num) { return ((65539*num)%%(2^31)) }
You forgot the brackets for the return function.
Hence, what was returned was always (65539 * num)
On Mon, Aug 14, 2017 at 12:49 PM, Martin M?ller Skarbiniks Pedersen
<traxplayer at gmail.com> wrote:
> Dear all,
>
> I am trying to learn functions in R and 3D plotting so I
2017 Sep 08
5
Optimize code to read text-file with digits
Hi,
Every day I try to write some small R programs to improve my R-skills.
Yesterday I wrote a small program to read the digits from "A Million
Random Digits" from RAND.
My code works but it is very slow and I guess the code is not optimal.
The digits.txt file downloaded from
https://www.rand.org/pubs/monograph_reports/MR1418.html
contains 20000 lines which looks like this:
00000
2017 Dec 03
0
Rcpp, dyn.load and C++ problems
.Call("compute_values_cpp")
Also, if you were passing arguments to the C++ function you would need to
declare the function differently.
Do a search on "Rcpp calling C++ functions from R"
HTH,
Eric
On Sun, Dec 3, 2017 at 3:06 AM, Martin M?ller Skarbiniks Pedersen <
traxplayer at gmail.com> wrote:
> Hi,
>
> I have written a small C++ function and compile it.
2018 Jun 01
1
Unable to take correct Web-snapshot
Thanks for that information.
However how can I use R to directly get data from that API?
On Fri, Jun 1, 2018 at 8:36 PM Martin M?ller Skarbiniks Pedersen <
traxplayer at gmail.com> wrote:
> On 1 June 2018 at 15:08, Christofer Bogaso <bogaso.christofer at gmail.com>
> wrote:
> > Hi again,
> >
> > I use the *webshot* package to take snapshot from Webpage.
2018 Jan 03
2
Help with first S3-class
On 3 January 2018 at 00:52, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 02/01/2018 6:38 PM, Martin M?ller Skarbiniks Pedersen wrote:
>>
>> Hi,
>>
>> I am trying to understand S3 classes. I have read several tutorials
>> about
>> the topics but I am still a bit confused. I guess it is because it is
>> so different from
>> Java
2018 Jan 19
0
reading lisp file in R
Here are the beginning of a R program.
I hope it can help you writing the rest of the program.
Regards
Martin M. S. Pedersen
----
filename <- "university.data"
lines <- readLines(filename)
first <- T
for (ALine in lines) {
ALine <- sub("^ +","",ALine)
ALine <- sub(")","",ALine, fixed = T)
if
2017 Sep 08
1
Optimize code to read text-file with digits
> On 8 Sep 2017, at 15:51 , Martin M?ller Skarbiniks Pedersen <traxplayer at gmail.com> wrote:
>
> On 8 September 2017 at 14:37, peter dalgaard <pdalgd at gmail.com> wrote:
>>
>>
>>> On 8 Sep 2017, at 14:03 , peter dalgaard <pdalgd at gmail.com> wrote:
>>>
>>> x <- scan("~/Downloads/digits.txt")
>>> x <-
2017 Nov 30
2
Help avoiding setting column type two times
Hi,
I think and hope this a good place to ask for code review for a R
beginners?
I have made a R script which generates a dataset based on 2009 danish
referendum and it does work.
But I think the code could be better and I would any comments how the
code can be improved.
At least I would like to know how I avoid converting several of the
columns to factors in the end of the code?
2018 Jan 17
2
Help making first dataset R package
Hi,
I am trying to make my first R package containing only a single
data.frame and documentation.
All code can be found at:
https://github.com/MartinMSPedersen/folkeafstemninger
When I check the package I get four warnings.
I will list all warnings in this email because they migth be connected.
1.
* checking if this is a source package ... WARNING
Subdirectory ?src? contains:
2018 Jan 02
0
Help with first S3-class
On 02/01/2018 6:38 PM, Martin M?ller Skarbiniks Pedersen wrote:
> Hi,
>
> I am trying to understand S3 classes. I have read several tutorials about
> the topics but I am still a bit confused. I guess it is because it is
> so different from
> Java OOP.
What you do below isn't S3. S3 is a system where the classes are
secondary to the generic functions. Methods
2018 Sep 04
2
[FORGED] Re: plotmath degree symbol
Hi
Thanks for that, but I still cannot confirm on ...
sudo docker run -v $(pwd):/home/work/ -w /home/work --rm -ti
rocker/r-ver:3.5.1
Could you please read the comments within the "Cairo Fonts" section of
the ?X11 help page, in case that offers some explanation.
Paul
On 29/08/18 02:15, Martin M?ller Skarbiniks Pedersen wrote:
> On Fri, 24 Aug 2018 at 19:53, Edzer Pebesma
>
2018 Jan 02
3
Help with first S3-class
Hi,
I am trying to understand S3 classes. I have read several tutorials about
the topics but I am still a bit confused. I guess it is because it is
so different from
Java OOP.
I have pasted my attempt at creating a bank-account class below and
my problems are:
1. What should be added some plot.default() calls the account$plot() method ?
2. What should the account$plot() be implemented to
2017 Dec 03
1
Rcpp, dyn.load and C++ problems
On 3 December 2017 at 20:19, Dirk Eddelbuettel <edd at debian.org> wrote:
Hi Dirk,
Thanks for your answers. I got a few more questions.
>
> 0) Wrong list. Rcpp has its down, rcpp-devel, and I basically do not read
> this and would have missed this were it not for luck.
OK. I did found the rcpp-devel mailing-list.
But I though it was a developers of the rcpp-package.
So it is ok