[R-pkg-devel] Bilingual (English and Portuguese) documentation in an R package

2016-05-20 Thread Lucas Ferreira Mation
Note: this was posted in this Stack Overflow

question, where I was advised to cross post here.


I am writing a package to facilitate importing Brazilian socio-economic
microdata sets (Census, PNAD, etc). I foresee two distinct groups of users
of the package:

   -

   Users in Brazil, who may feel more at ease with the documentation in
   Portuguese. The probably can understand English to some extent, but a
   foreign language would probably make the package feel less "ergonomic".
   -

   The broader international users community, from whom English
   documentation may be a necessary condition.

Is it possible to write a package in a way that the documentation is
"bilingual" (English and Portuguese), and that the language shown to the
user will depend on their country/language settings?

Also,

Is that doable within the roxygen2 documentation framework?

I realise there is a tradeoff of making the package more user-friendly by
making it bilingual vs. the increased complexity and difficulty to
maintain. General comments on this tradeoff from previous expirience are
also welcome.

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Advice on in-RAM out of RAM (MonetDB) in data import package

2016-07-11 Thread Lucas Ferreira Mation
I am writing a package that imports most of the Brazillian socio-economic
micro datasets.
(microdadosBrasil ). The
idea of the package that the data import is very simple, so even users with
verry little R programming knowledge can use the data easily.
Although I would like to have decent performance, the first concern is
usability.

The package imports data to an in memory data.table  object.
I am now trying to implement support for out of memory datasets using
MonetDBLite.

Is there a (non OS dependent) way to predict if a dataset will fit into
memory or not? Ideally the package would ask the computer for the maximum
amount of RAM that R can use. The package would then default to MonetDBLite
if the available RAM was smaller then 3x the in memory size of the dataset.

There will also be an argument for the user to choose himself wether to use
in RAM or out of RAM, but if that argument is not provided the package
would choose for him.

In any case, does that seems reasonable? Or should I force the user to be
aware of this?

Another option would be to default to MonetDB (unless the user explicitly
asks for in-memory data). Is MonetDB performance so good that it would not
make much of a difference?

Another disadvantage of the MonetDB default is that the user will not be
able to run base-R data manipulation commands. So he will have to use dplyr
(which is great and simple) or SQL queries (which few people will know).

reagards
Lucas

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Advice on in-RAM out of RAM (MonetDB) in data import package

2016-07-11 Thread Lucas Ferreira Mation
Just a clarification, I am using MonetDBLite for this.

2016-07-11 11:28 GMT-03:00 Lucas Ferreira Mation :

> I am writing a package that imports most of the Brazillian socio-economic
> micro datasets.
> (microdadosBrasil <https://github.com/lucasmation/microdadosBrasil>). The
> idea of the package that the data import is very simple, so even users with
> verry little R programming knowledge can use the data easily.
> Although I would like to have decent performance, the first concern is
> usability.
>
> The package imports data to an in memory data.table  object.
> I am now trying to implement support for out of memory datasets using
> MonetDBLite.
>
> Is there a (non OS dependent) way to predict if a dataset will fit into
> memory or not? Ideally the package would ask the computer for the maximum
> amount of RAM that R can use. The package would then default to
> MonetDBLite if the available RAM was smaller then 3x the in memory size
> of the dataset.
>
> There will also be an argument for the user to choose himself wether to
> use in RAM or out of RAM, but if that argument is not provided the package
> would choose for him.
>
> In any case, does that seems reasonable? Or should I force the user to be
> aware of this?
>
> Another option would be to default to MonetDB (unless the user explicitly
> asks for in-memory data). Is MonetDB performance so good that it would
> not make much of a difference?
>
> Another disadvantage of the MonetDB default is that the user will not be
> able to run base-R data manipulation commands. So he will have to use dplyr
> (which is great and simple) or SQL queries (which few people will know).
>
> reagards
> Lucas
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] robust download function in R (similar to wget)?

2016-08-25 Thread Lucas Ferreira Mation
I am creating this package 
that has to download data from some sources that are a bit
unstable/unreliable. The problem is described in this issue
.

Is there a more "robust" download fucntion in R?
Something similar to wget, that would:

- where there are errors, repeat the download a few times before giving up,
preferably, using partial data on a file being downloaded from previous
attempts
- check the integrity of the downloaded file

As this has to be embedded in an R package, the solution needs to be OS
independent and require no installation of external software by the user.

regards
Lucas

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel