[R] Include a formula using the function “makeParamSet”

2019-10-09 Thread Nelly Reduan
Hello, I am performing Latin Hypercube sampling from functions "makeParamSet" and "generateDesign" (package "ParamHelpers") in R. Using the function "makeParamSet", how can I specify a formula to define a given parameter ? Here is an example where "g� is the product of �a� and �c�: ps <-

[R] Speeding up R code - Apply a function to each row of a matrix using the dplyr package

2018-11-01 Thread Nelly Reduan
Hello, I have a input data frame with multiple rows. For each row, I want to apply a function. The input data frame has 1,000,000+ rows. How can I speed up my code ? I would like to keep the function "func". Here is a reproducible example with a simple function: library(tictoc)

[R] Round down numeric values with decimals

2018-09-04 Thread Nelly Reduan
Hello, How can I round down numeric values with decimals? For example, > signif(3.896037e+09, digits = 1) [1] 4e+09 The expected result is 3e+09 (and not 4e+09). > signif(8.68542378e-10, digits = 1) [1] 9e-10 The expected result is 8e-10 (and not 9e-10). Thank you very much for

Re: [R] Generate N random numbers with a given probability and condition

2018-07-11 Thread Nelly Reduan
a vector rather than to permute a vector ? Many thanks for your time. Have a nice day Nell De : Jim Lemon Envoyé : mardi 10 juillet 2018 17:44:13 À : Nelly Reduan Objet : Re: [R] Generate N random numbers with a given probability and condition Hi Nell, I may

Re: [R] Generate N random numbers with a given probability and condition

2018-07-10 Thread Nelly Reduan
integers that sum to M and the integers would be selected from a uniform distribution. Many thanks for your time Nell De : Rolf Turner Envoyé : mercredi 4 juillet 2018 16:11:11 À : Nelly Reduan Cc : r-help@r-project.org Objet : Re: [R] Generate N random

[R] Generate N random numbers with a given probability and condition

2018-07-04 Thread Nelly Reduan
Dear all, I would like to generate N random numbers with a given probability and condition but I'm not sure how to do this. For example, I have N = 20 and the vector from which to choose is seq(0, 10, 1). I have tested: x <- sample(seq(0, 10, 1), 20, replace=TRUE, prob=rep(0.28,

[R] Bootstrap analysis from a conditional logistic regression

2017-11-13 Thread Nelly Reduan
Nelly Reduan a partag� un fichier OneDrive avec vous. Pour l�afficher, cliquez sur le lien ci-dessous. <https://1drv.ms/u/s!Apkg2VlgfYyDgRAeVIM0nEajx0Fb> [https://r1.res.office365.com/owa/prem/images/dc-png_20.png]<https://1drv.ms/u/s!Apkg2VlgfYyDgRAeVIM0nEajx0Fb> Screensho

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Nelly Reduan
<- strtoi(set[index]) > print(set[10,1]) ## Problem: must be numeric [1] "1" Thanks very much for your help. Nell De : Jim Lemon <drjimle...@gmail.com> Envoy� : mercredi 30 ao�t 2017 15:00:32 � : Nelly Reduan; r-help mailing list Objet

Re: [R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Nelly Reduan
via OneDrive Thanks very much for your help. Nell De : David Winsemius <dwinsem...@comcast.net> Envoy� : mercredi 30 ao�t 2017 12:59:57 � : Nelly Reduan Cc : r-help@r-project.org Objet : Re: [R] Converting character to numeric using the package "XLConnect"

[R] Converting character to numeric using the package "XLConnect"

2017-08-30 Thread Nelly Reduan
Hello, >From an Excel file imported into R where each cell contains characters, I >would like to convert some characters to numeric. However, my code doesn’t >work. When I write data to worksheets in an Excel file, some numbers in the >cells are stored as text (instead of numeric). Here is my

Re: [R] Latin Hypercube Sampling when parameters are defined according to specific probability distributions

2017-05-31 Thread Nelly Reduan
ledLHS) Sorry, it’s the first time that I perform a sensitivity analysis using the LHS. Thank you very much for your time. Have a nice day Nell De : Rob C <bertcarn...@gmail.com> Envoyé : mardi 30 mai 2017 16:26:08 À : Nelly Reduan Cc : r-help@r

Re: [R] Latin Hypercube Sampling when parameters are defined according to specific probability distributions

2017-05-30 Thread Nelly Reduan
; de la part de Rob C <bertcarn...@gmail.com> Envoyé : samedi 27 mai 2017 13:32:23 À : r-help@r-project.org Objet : Re: [R] Latin Hypercube Sampling when parameters are defined according to specific probability distributions >May 26, 2017; 11:41am Nelly Reduan Latin Hypercube Sampling

[R] Latin Hypercube Sampling when parameters are defined according to specific probability distributions

2017-05-26 Thread Nelly Reduan
Hello, I would like to perform a sensitivity analysis using a Latin Hypercube Sampling (LHS). Among the input parameters in the model, I have a parameter �dispersal distance� which is defined according to an exponential probability distribution. In the model, the user thus sets a default

Re: [R] Run a Python code from R

2016-12-01 Thread Nelly Reduan
script ? Thanks a lot for your time. Have a nice day Nell De : Robert Baer <rb...@atsu.edu> Envoy� : samedi 19 novembre 2016 16:05:13 � : David Winsemius; Nelly Reduan Cc : r-help@r-project.org Objet : Re: [R] Run a Python code from R >From http

[R] GAMs: predictions with the number of live traps as an offset variable

2016-11-25 Thread Nelly Reduan
Hello, I built a Generalized Additive Model (GAM) using a negative binomial distribution (my response variable represents an animal count). In the GAM, I included the log(trapping effort) as an offset variable to account for variations in the sampling effort across trapping sites. Trapping

Re: [R] Run a Python code from R

2016-11-16 Thread Nelly Reduan
1], [ 0.41534291, 0.41333479, 0.48118995, ..., 0.19203674, 0.04192771, 0.03679473], [ 0.5188 Nell ________ De : Wensui Liu <liuwen...@gmail.com> Envoy� : mercredi 16 novembre 2016 16:00:03 � : Nelly Reduan Cc : r-help@r-project

[R] Run a Python code from R

2016-11-16 Thread Nelly Reduan
Hello, How can I run this Python code from R ? >>> import nlmpy >>> nlm = nlmpy.mpd(nRow=50, nCol=50, h=0.75) >>> nlmpy.exportASCIIGrid("raster.asc", nlm) Nlmpy is a Python package to build neutral landscape models https://pypi.python.org/pypi/nlmpy . The example comes from this website. I

[R] Sort a data table

2016-08-11 Thread Nelly Reduan
Hello, I have some problems to sort a large data table. In particular, I would like to sort a data table in such a way that the duplicated values in two columns are disposed one below the other and if possible in an ascending order (especially for the column "Date"). An example with a short

Re: [R] Error code 100 when using the function “fitdist” from the fitdistrplus package

2016-08-04 Thread Nelly Reduan
Envoy� : jeudi 4 ao�t 2016 08:45:01 � : Nelly Reduan Cc : r-help@r-project.org Objet : Re: [R] Error code 100 when using the function �fitdist� from the fitdistrplus package > On Aug 3, 2016, at 4:42 PM, Nelly Reduan <nell.r...@hotmail.fr> wrote: > > Nelly Reduan has shared On

[R] Error code 100 when using the function “fitdist” from the fitdistrplus package

2016-08-04 Thread Nelly Reduan
Nelly Reduan has shared OneDrive?files with you. To view them, click the link or image below. <https://1drv.ms/u/s!Apkg2VlgfYyDgQo8BnoB_Ds4KXgR> [https://bzmvxw.by3301.livefilesto