[R] Using nls or nls.lm with a simulation output

2009-02-12 Thread Marc Girondot
We would like to fit parameters using a simulation with stochastic processes as theoretical values. We generate a simple exemple with nls.lm to see the logic and the problem: First without stochasticity (it is a dummy example, the fited value is simple the mean of a set of 10 numbers): #Ten

[R] dgamma in jags within r

2011-09-10 Thread Marc Girondot
do not see what. -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex

Re: [R] Poor performance of Optim

2011-10-01 Thread Marc Girondot
-- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex, France Tel: 33 1 (0)1.69.15.72.30 Fax: 33 1 (0)1.69.15.73.53 e

[R] assign a value to an element

2012-03-18 Thread Marc Girondot
this solution: eval(parse(text=paste(name, -100, sep=))) vec  [1]   1   2   3 100   5   6   7   8   9  10 Is-it the only way ? It is not very elegant ! Thanks a lot Marc __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution

[R] Need for optim() resistant to error on the fit criteria.

2012-04-01 Thread Marc Girondot
=list(maxit=500, trace=1)) optim(par, fitNorm_error, method=BFGS, hessian=FALSE, control=list(maxit=500, trace=1)) -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des

[R] Package seems to be present but library don't find it

2012-04-03 Thread Marc Girondot
packages /Library/Frameworks/R.framework/Versions/2.14/Resources/library/HelloWorld -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et

Re: [R] Package seems to be present but library don't find it

2012-04-03 Thread Marc Girondot
with other packages /Library/Frameworks/R.framework/Versions/2.14/Resources/library/HelloWorld -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS

Re: [R] Package seems to be present but library don't find it

2012-04-03 Thread Marc Girondot
AM, Marc Girondot wrote: In case someone has the competence to check, the file is here: setwd(~) download.file(http://www.ese.u-psud.fr/epc/conservation/r-scripts/HelloWorld_1.0.tar.gz;, HelloWorld_1.0.tar.gz) install.packages(HelloWorld_1.0.tar.gz, repos = NULL) The problem

Re: [R] 'for' in steps

2011-10-27 Thread Marc Girondot
Le 28/10/11 00:29, RhoR a écrit : I want to use for (i in 1:time) but I want the increments to be monthly. For example, if I'm adding interest to a virtual bank account monthly, for a total of 'time' in years which the user has entered. If I understand well the problem: for (i in 1:time) {

Re: [R] Simple time series question with zoo

2011-10-27 Thread Marc Girondot
Le 27/10/11 22:18, Vinny Moriarty a écrit : New user here. My goal is pull daily averages from a long dataset. I've been working with some code I got from this list from https://stat.ethz.ch/pipermail/r-help/2009-March/191302.html The code how I have been using it is as follows:

[R] Indistinguishable balls into distinguishable boxes

2012-02-03 Thread Marc Girondot
0 61002 -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex

[R] Month name in English, not R running language

2013-01-14 Thread Marc Girondot
Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex, France Tel: 33 1

Re: [R] Month name in English, not R running language

2013-01-14 Thread Marc Girondot
on the list as I have had some difficulties to find the good format for locale parameter. It could help others) Le 15/01/13 07:41, Pascal Oettli a écrit : Hello, ?Sys.setlocale HTH, Pascal Le 15/01/2013 15:28, Marc Girondot a écrit : When ploting a timeseries, the months are shown with abbreviation

Re: [R] parallel

2012-09-24 Thread Marc Girondot
Sincerely Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay

[R] Autorun when library(xxx) is called

2012-10-17 Thread Marc Girondot
at the time of package load (the package is not still in CRAN; it is a work in progress with several testers). Thanks a lot for your advice, Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des

Re: [R] Month Difference

2012-09-07 Thread Marc Girondot
- c(1990-05-01) indicemonth - num.months ( x , y ) Sincerely Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université

Re: [R] Errorbar

2014-02-21 Thread Marc Girondot
=rnorm(100, 1, 0.1)) Marc Girondot Le 18/02/2014 16:57, Alzahrani, Ahmad K A a écrit : Hi All, Can anyone show me how to add a error bar to my graphs. I am currently using this code g-ggplot(means,aes(x=variable,y=value)) g-g+geom_bar(stat=identity)+facet_wrap(~Site+Season) g Thanks, Akaalz

[R] Is it possible to include shiny code in a package?

2014-03-02 Thread Marc Girondot
Dear list member, I would like to include shiny code within a package. My idea was to include a folder 'shiny' for example and to put in this folder the files server.R and ui.R required for shiny as well as the css file and a style.R file that call this css file. Is it possible ? When I call

Re: [R] Import multiple files into R

2014-03-20 Thread Marc Girondot
users) Sincerely, Marc Girondot Le 20/03/2014 06:15, ajaykumar a écrit : Hi I want to import around 75 files. Each file has a name and a time and is comma separated. For example some of my file names are Asheville_Dec.txt Asheville_Jan.txt Asheville_Feb.txt Charlotte_Dec.txt Chapelhill_Jan.txt

[R] Interpreting effect of ordered categorical predictor

2014-04-02 Thread Marc Girondot
(I posted this question in http://stackoverflow.com/questions/22781965/interpreting-effect-of-ordered-categorical-predictor without answer... I try here) Thanks a lot Marc My question is very similar to this one (https://stat.ethz.ch/pipermail/r-help/2012-March/305357.html) but I fail to

[R] Any solution to have RnetCDF, ncdf or ncdf4 in R 3.1 ?

2014-04-06 Thread Marc Girondot
: configuration failed for package ‘ncdf4’ * removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/ncdf4’ Warning in install.packages : installation of package ‘ncdf4’ had non-zero exit status Sincerely, Marc Girondot __ R-help@r

Re: [R] Any solution to have RnetCDF, ncdf or ncdf4 in R 3.1 ?

2014-04-06 Thread Marc Girondot
Le 06/04/2014 16:47, David W. Pierce a écrit : Hi Marc, those packages are just interfaces to the netcdf library that must already exist on your machine. Try installing the netcdf library first, and then installing the R package. You will need the development version of the netcdf library

[R] Changes between R 3.1 vs 3.0.3

2014-04-07 Thread Marc Girondot
and is better in my point of view. It will prevent unwanted side effect in code. Thanks a lot Marc Girondot __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] Plotting does odd line thing

2014-04-07 Thread Marc Girondot
Le 08/04/2014 04:20, David Doyle a écrit : Hello folks, When I use the lines function below it connects all my points but then draws a line back to the start point. Any suggestions on what is going on?? mydata -read.csv(http://doylesdartden.com/R/test_data.csv;, sep=,) attach(mydata)

[R] GLM using truncated lognormal distribution

2014-04-26 Thread Marc Girondot
Dear honorable list-members, I know how to fit a truncated lognormal distribution (or Gaussian) (example here: http://max2.ese.u-psud.fr/epc/conservation/Girondot/Publications/Blog_r/Entrees/2012/5/24_Adjust_a_truncated_lognormal_distribution.html ) but I would like to use it in the context of

[R] outer() problem

2014-05-01 Thread Marc Girondot
Dear list-members, Can someone explains me why the last command gives an error. Thanks a lot: outer(0:1, 0:1, FUN=function(x, y) {x+y}) [,1] [,2] [1,]01 [2,]12 outer(0:1, 0:1, FUN=function(x, y) {x}) [,1] [,2] [1,]00 [2,]11 outer(0:1, 0:1,

Re: [R] efficient sine interpolation

2014-05-13 Thread Marc Girondot
You can try this: http://max2.ese.u-psud.fr/epc/conservation/Girondot/Publications/Blog_r/Entrees/2013/6/4_GLM_with_periodic_(annual)_transformation_of_factor.html Sincerely, Marc Le 13/05/2014 05:42, Ortiz-Bobea, Ariel a écrit : Hello, I'm trying to fit a sine curve over successive

Re: [R] Masking oceans using polypath

2013-08-05 Thread Marc Girondot
for Australia, after the same code for France with the display problem. Thanks a lot for any advice on the reason for the discrepancy. Marc Girondot ### For Australia library(mapdata) outline - map(worldHires, regions=Australia, exact=TRUE, plot=FALSE) # returns a list of x/y

Re: [R] help with adding SD to graph

2013-08-13 Thread Marc Girondot
), xlab=axe x, ylab=axe y, bty=n, xlim=c(1,100), x.minus=x-2, x.plus=x+2) Sincerely Marc Girondot Le 12/08/13 15:41, Hedera a écrit : Hello, I really need help, I am completely new in using R and many things were possible to figure out

Re: [R] about plantbreeding library

2013-08-16 Thread Marc Girondot
. You should read the posting guidelines. http://www.r-project.org/posting-guide.html Give a reproducible example to show what you try to do and why it does not work. Sincerely Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie

[R] Depends and Imports in DESCRIPTION file

2013-10-22 Thread Marc Girondot
. Of course I read ‘Creating R packages’ of the ‘Writing R Extensions’ manual, but I can't find solution to this problem. Thanks a lot, Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de

Re: [R] Depends and Imports in DESCRIPTION file

2013-10-22 Thread Marc Girondot
Le 23/10/13 05:03, Marc Girondot a écrit : Dear list members: I try to check my updated package to include a new version in CRAN (phenology) but a new error is indicated and I don't find the logic. First my system: * using R version 3.0.2 Patched (2013-09-27 r64011) * using platform: x86_64

[R] How to create as.numeric.xxx

2012-11-16 Thread Marc Girondot
, ...) {return(x*2)} as.numeric(d) It does not work: [1] 10 Is it possible ? Thanks a lot Marc Girondot __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] How to get the result of eval()

2012-11-16 Thread Marc Girondot
I just discover the deriv function but I have a minor problem at the end when using its result: For example: dx2x - deriv(~ A*x^2, x) ; dx2x # it works fine: # expression({ # .value - A * x^2 # .grad - array(0, c(length(.value), 1L), list(NULL, c(x))) # .grad[, x] - A * (2 * x) # attr(.value,

Re: [R] fitting

2012-11-16 Thread Marc Girondot
will be always as 0=a1 =1 (to be exact, it is 0a1 1 rather. Often it is sufficient) Hope it help -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS

[R] Trick to replace NA

2012-11-22 Thread Marc Girondot
])} If someone have another solution, I will be most happy ! Sincerely Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et

Re: [R] cosine curve fit

2012-11-27 Thread Marc Girondot
-- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex, France Tel: 33 1 (0)1.69.15.72.30 Fax: 33 1 (0

[R] Package check using --as-cran

2013-01-02 Thread Marc Girondot
. Thanks a lot Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay

Re: [R] Package check using --as-cran

2013-01-02 Thread Marc Girondot
Le 02/01/13 16:03, Uwe Ligges a écrit : On 02.01.2013 11:58, Marc Girondot wrote: I use R 2.15.2 on MacosX 10.8.2 I have a problem checking for a package that I want to submit in CRAN. When I check like that, no problem or warning are detected. system(R CMD check '[path]/phenology') I

Re: [R] Package check using --as-cran

2013-01-02 Thread Marc Girondot
Le 02/01/13 17:38, Uwe Ligges a écrit : On 02.01.2013 17:28, Marc Girondot wrote: Le 02/01/13 16:03, Uwe Ligges a écrit : On 02.01.2013 11:58, Marc Girondot wrote: I use R 2.15.2 on MacosX 10.8.2 I have a problem checking for a package that I want to submit in CRAN. When I check like

Re: [R] Package check using --as-cran

2013-01-03 Thread Marc Girondot
. Confusing ! Thanks a lot for your help, Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079

Re: [R] different color indicates difference magnitude

2013-03-13 Thread Marc Girondot
, bty=n) Sincerly Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay

Re: [R] Add a continuous color ramp legend to a 3d scatter plot

2013-03-13 Thread Marc Girondot
! Look at the package fields: ?colorbar.plot Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079

Re: [R] Add a continuous color ramp legend to a 3d scatter plot

2013-03-13 Thread Marc Girondot
=FALSE, box=FALSE) zr- range(c(z)) image.plot(legend.only=TRUE,col=cols, zlim=zr) I wanted to have a color ramp legend based on z on the side of the plot. I'll greatly appreciate any help! thanks, Z On Wed, Mar 13, 2013 at 2:11 AM, Marc Girondot marc_...@yahoo.fr mailto:marc_

Re: [R] boxplot

2013-03-14 Thread Marc Girondot
-guide.html and provide commented, minimal, self-contained, reproducible code. -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université

Re: [R] how to change `Year_Month)201103` into Year_Month)201103 using R?

2013-03-14 Thread Marc Girondot
(`, , x)) Year_Month)201103 Sincerely Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment

Re: [R] how to import DNA sequences in R

2013-03-14 Thread Marc Girondot
of information. For example: https://a-little-book-of-r-for-bioinformatics.readthedocs.org/en/latest/src/chapter1.html Sincerely Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des

Re: [R] column and line graphs in R

2013-03-14 Thread Marc Girondot
is a bivariate from a matrix object: fungal - matrix(c(12, 54, 65, 76, .2, .6, .1, .7), nrow=4) plot(fungal, xlab=Abondance, ylab=Frequency, bty=n, xlim=c(0,80)) (I don't understand the difference between relative abondance and frequency). Sincerely, Marc Girondot

Re: [R] column and line graphs in R

2013-03-15 Thread Marc Girondot
frequency of the same MOTU. Thank you very much in advance, -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11

Re: [R] Add a continuous color ramp legend to a 3d scatter plot

2013-03-15 Thread Marc Girondot
-- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex, France Tel: 33 1 (0)1.69.15.72.30 Fax: 33 1 (0

Re: [R] Writing a hyperlink to a csv file

2013-03-16 Thread Marc Girondot
],\n)) f-scan(nmax=1, quiet=TRUE) browseURL(links[f,2]) Sincerely Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris

Re: [R] Writing a hyperlink to a csv file

2013-03-16 Thread Marc Girondot
-com:office:spreadsheet Worksheet ss:Name=TEST Table Row ss:Index=3 Cell ss:Index=2 ss:HRef=http://www.google.com;Data ss:Type=Stringhttp://www.google.com/Data/Cell /Row /Table /Worksheet /Workbook Sincerely Marc -- __ Marc

Re: [R] Fit a mixture of lognormal and normal distributions

2013-03-19 Thread Marc Girondot
(Proportion of Gaussian data, p) lines(seq(from=0, to=5, length=100), p*dnorm(seq(from=0, to=5, length=100), result2$par[1], result2$par[2])+ (1-p)*dlnorm(seq(from=0, to=5, length=100), result2$par[3], result2$par[4]), col=blue) Sincerely Marc Girondot

Re: [R] R web application development

2013-03-19 Thread Marc Girondot
Take a look at this package: http://www.rstudio.com/shiny/ Sincerely Marc Girondot Le 19/03/13 00:55, John linux-user a écrit : Dear all, I am wondering if what would be the simple way to develop a simple web application that runs R. That is, the web application allows any user upload

Re: [R] highlight overlapping region of two densities

2013-03-20 Thread Marc Girondot
- density(myd1)$y polygon(d0x, d0y, col=red, border=FALSE) polygon(d1x, d1y, col=rgb(0, 1, 0, 0.5), border=FALSE) -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS

Re: [R] trouble with data frame

2013-03-22 Thread Marc Girondot
[a,b]) )] are reversed Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405

Re: [R] how to draw the math graph?

2013-03-30 Thread Marc Girondot
Le 30/03/13 09:08, 水静流深 a écrit : how can i draw the graph in R? Can you ask a more precise question and show that you have tried to do something before asking such a general question: How the world has been created... Sincerely Marc Girondot

Re: [R] Generating a bivariate joint t distribution in R

2013-04-03 Thread Marc Girondot
-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. library(fCopulae) ?rmvst Sincerely Marc Girondot

[R] List of non available packages for R 3.0.0 ?

2013-04-04 Thread Marc Girondot
? And thanks a lot for all the programmers and maintainers for this great software. Sincerely, Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés

Re: [R] How to plot several years data with date information by months?

2013-04-06 Thread Marc Girondot
month), label=FALSE) axis(1, at=seq(from=as.Date(2000-01-01), to=as.Date(2006-12-31), by=1 year), lwd.ticks=2, label=c(2000:2006)) Sincerely Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation

Re: [R] How to plot several years data with date information by months?

2013-04-06 Thread Marc Girondot
), lwd.ticks=2, label=FALSE, lwd=0) axis(1, at=seq(from=as.Date(2000-07-01), to=as.Date(2006-12-31), by=1 year), lwd.ticks=0, label=c(2000:2006), lwd=0) -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de

Re: [R] Problem with caret

2013-04-11 Thread Marc Girondot
Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex, France Tel

Re: [R] Batch open netcdf files and get variables

2013-04-13 Thread Marc Girondot
I make an example for the use of this package here: http://max2.ese.u-psud.fr/epc/conservation/Girondot/Publications/Blog_r/Entrees/2013/2/26_Using_package_RNetCDF_with_SST.html Sincerely Marc Girondot Le 12/04/13 17:39, Enhao Du a écrit : Hi, I'm new to R. I have some daily soil moisture data

Re: [R] R process slow down after a amount of time

2013-04-16 Thread Marc Girondot
} } plot(1:999, diff(tm), bty=n, type=l, ylim=c(0, 0.05)) -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR

[R] Problem with package RNetCDF when attached

2013-04-25 Thread Marc Girondot
I have a problem with the RNetCDF package in MacOSX 10.8.3, R3.0.0. If you have a solution, it would be great ! Thanks a lot. Marc Girondot install.packages(RNetCDF) essai de l'URL 'http://cran.at.r-project.org/bin/macosx/contrib/3.0/RNetCDF_1.6.1-2.tgz' Content type 'application/x-gzip

[R] Loading of package RNetCDF fails

2013-04-27 Thread Marc Girondot
loadNamespace() pour 'RNetCDF', détails : appel : NULL erreur : I/O error (udunits) Erreur : le chargement du package ou de l'espace de noms a échoué pour ‘RNetCDF’ Anybody have some info about what's happened ? In MacOSX 10.8.3, R3.0.0 Sincerely, Marc Girondot

[R] Question about fitting a periodic model in glmm

2013-05-07 Thread Marc Girondot
of days and covariate, how I can do as days appears in two effects (sin and cos) ? A third question related, is it possible to use a glmm with negative binomial distribution ? I don't find still... ... or perhaps you have a better way to do all of that ! Thanks a lot. Marc Girondot

Re: [R] extract data from square cracket

2012-05-16 Thread Marc Girondot
], [0.80], [0.75], [0.93]))) as.numeric(gsub([^[:digit:].], , d[,col3])) Then you get: [1] 0.86 0.93 0.95 0.91 0.89 0.84 0.89 0.80 0.75 0.93 Sincerely, Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de

Re: [R] Optimization inconsistencies

2012-05-18 Thread Marc Girondot
the optim does not converge. Hope it hepls, Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment

Re: [R] Problem with barplot

2014-01-11 Thread Marc Girondot
of this command. Sincerely Marc Girondot __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible

Re: [R] simple linear regression

2014-02-13 Thread Marc Girondot
. There are approximately 19.10^6 pages with linear model r ! I will make a little publicity for the one I did: The mess of linear regression. http://129.175.106.17/epc/conservation/Girondot/Publications/Blog_r/Entrees/2014/1/3_The_mess_of_linear_regressions.html Sincerely, Marc Girondot

[R] How to use fixed parameter in mle2() function from bbmle package?

2014-06-08 Thread Marc Girondot
but I get no answer still. If anyone has solution, it would be great. Thanks. Sincerely, Marc Girondot I make a very simplified version of the problem I have: First, a version that works perfectly. It fits simply a Gaussian distribution from a set of data: # generate data from Gaussian

[R] c() with POSIXlt objects and their timezone is lost

2014-06-23 Thread Marc Girondot
When two POSIXlt objects are combine with c(), they lost their tzone attribute, even if they are the same. I don't know if it is a feature, but I don't like it ! Marc es - strptime(2010-02-03 10:20:30, format=%Y-%m-%d %H:%M:%S, tz=UTC) es [1] 2010-02-03 10:20:30 UTC attributes(es) $names

Re: [R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Marc Girondot
, errbar.lwd = par(lwd), errbar.lty = par(lty), errbar.col = par(fg), errbar.y.polygon = FALSE, errbar.y.polygon.list = list(NULL), add = FALSE) It permits to plot errbar both on x and y. Sincerely, Marc Girondot Le 19/07/2014 02:27, Ahmed Attia a écrit : My problem is getting x and y

[R] Not display message when using system()

2014-08-29 Thread Marc Girondot
Dear list members, My question concerns the use of system() in R version 3.1.1 patched and MacosX 10.9.4. I want capture the result of a system command without displaying error message. I give exemple. In terminal, if I do this command: find $HOME -type f -name 'PuertoSanJose.csv' I get the

Re: [R] Not display message when using system()

2014-08-31 Thread Marc Girondot
, 2014 12:21 PM, Marc Girondot marc_...@yahoo.fr mailto:marc_...@yahoo.fr wrote: Dear list members, My question concerns the use of system() in R version 3.1.1 patched and MacosX 10.9.4. I want capture the result of a system command without displaying error message. I

Re: [R] Opening netCDF file with large number of variables but size is small in R

2014-10-01 Thread Marc Girondot
Le 01/10/2014 13:11, കുഞ്ഞായി kunjaai a écrit : Dear all, I am trying to open a netcdf file with size 1.2 MB contains more than 3000 variables using 'netcdf' package. I am facing problem that it taking more than 10 minute to open this small nc file. Is any way to make it fast ? Have

[R] Update package dor r-devlop

2014-10-12 Thread Marc Girondot
to be used ? Thanks Marc Girondot __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible

Re: [R] format negative numbers

2014-10-20 Thread Marc Girondot
Is it what you want? st - 0.123- gsub((.+)(-), \\2\\1, st) [1] -0.123 st - 0.123 gsub((.+)(-), \\2\\1, st) [1] 0.123 Sincerely Marc Le 20/10/2014 09:03, PIKAL Petr a écrit : Dear all. Before I start fishing in (for me) murky regular expression waters I try to ask community about

Re: [R] [Sweave] doesn't accept unicode?

2014-10-21 Thread Marc Girondot
Look at here for an example using an encoding in knitr: http://max2.ese.u-psud.fr/epc/conservation/Girondot/Publications/Blog_r/Entrees/2014/9/4_symbol_in_knitr.html Sincerely Marc Le 22/10/2014 02:45, moon...@posteo.org a écrit : Of course I manage and write my tex-files in unicode (utf-8)

[R] Is it possible to define another kind of NA

2014-11-09 Thread Marc Girondot
Dear member list, In many experimental sciences, there is a lower detection limit (LDL) when a dosage of a product is done. Then some samples are evaluated to be below this limit. I search for the best way to indicate in a data.frame that some values are such LDL. Ideally, an equivalent of NA

[R] 1. What function to use to read all the files in a directory to a vector in R code? 2. What function to use to coerce character string into numeric?

2014-11-11 Thread Marc Girondot
file. Ex: read.delim or read.xls from gdata package ... Parameters send to the read function Sincerely, Marc Girondot 2. What function to use to coerce character string into numeric? As a help to others, I figured out to use setwd(C:/) to set working directory! Aditya ​First, please don't

Re: [R] Is it possible to define another kind of NA

2014-11-13 Thread Marc Girondot
Le 13/11/2014 01:26, MacQueen, Don a écrit : Along the lines of what Bert Gunter said, the ideal way to represent LDL results depends on the functions used later to analyze them. I deal with such data on a daily basis and have never found it necessary to incorporate that information in the same

Re: [R] HELP asin transformation

2015-02-24 Thread Marc Girondot
Le 22/02/2015 19:28, CHIRIBOGA Xavier a écrit : Dear all, I attempted to transform my data using asin but a WARNING message appears: dat1$Abu.tr-asin(sqrt(dat1$Abundance/100)) Warning message: In asin(sqrt(dat1$Abundance/100)) : NaNs produced What does it mean? Is it a problem? How can

Re: [R] HELP asin transformation

2015-02-24 Thread Marc Girondot
Le 22/02/2015 19:28, CHIRIBOGA Xavier a écrit : Dear all, I attempted to transform my data using asin but a WARNING message appears: dat1$Abu.tr-asin(sqrt(dat1$Abundance/100)) Warning message: In asin(sqrt(dat1$Abundance/100)) : NaNs produced What does it mean? Is it a problem? How can

[R] How get list element name in R 3.2.0

2015-04-26 Thread Marc Girondot
I don't see if this difference is noted is the list of changes: http://cran.r-project.org/doc/manuals/r-devel/NEWS.html If it is not a bug but a feature, what is the new way to get the list element name within a lapply or mclappy function. Thanks a lot Marc Girondot

[R] gdata library 2.16.1

2015-05-04 Thread Marc Girondot
Dear list-members, Since I update gdata library to 2.16.1 version this morning, I have an error on the two macs I use (details on system and R versions at the end). When I load the package, I have this error: library(gdata,

Re: [R] Error not reported while checking package as cran

2015-06-29 Thread Marc Girondot
to install a more recent one. Henrik On Jun 29, 2015 1:49 AM, Marc Girondot marc_...@yahoo.fr mailto:marc_...@yahoo.fr wrote: Dear members, I have submitted to CRAN a new version of a package yesterday after checking it as cran with the lastest 3.2.1 R version and no error

[R] Error not reported while checking package as cran

2015-06-29 Thread Marc Girondot
Dear members, I have submitted to CRAN a new version of a package yesterday after checking it as cran with the lastest 3.2.1 R version and no error was reported. The command I used was: R CMD check 'xxx/HelpersMG' --as-cran However, I received reports from CRAN maintainers that I should add

Re: [R] reading in multiple data sets in 2 loops

2016-02-07 Thread Marc Girondot
Try this: # install package HelpersMG from CRAN including dependencies install.packages("HelpersMG") # Update to the lastest version install.packages("http://www.ese.u-psud.fr/epc/conservation/CRAN/HelpersMG.tar.gz;, repos=NULL, type="source") # Use the function read_folder()

[R] Use predict() after lmer() (library lme4)

2016-02-02 Thread Marc Girondot
Bonjour, (don't worry, after I will write in English [at least I will try ;) ]) I try to understand better mixed models and then I have generated data and I try to understand how the fixed and the random effects are used in predict(). I understand when the random effect is of the form (1 |

Re: [R] axis break in R

2016-02-28 Thread Marc Girondot
Hi Eike, I didn't know how to do, so it was a nice exercise. Here is a solution using plot(). I have made a function plot.break(); the name of parameters of the function are self-explained (I think), but tell me if you need more explanation. You can add any parameters of the plot() function.

Re: [R] dependent p.values

2016-07-10 Thread Marc Girondot
without context: why p.values are dependent ? Do they come from the same dataset ? Or are they linked by an external source ? For both these situations, combining dependent p.values seems strange for me. When you will ask question in stackexchange, be more precise. Sincerely, Marc Girondot

Re: [R] Limit the y-axis line with ggplot2 (not the axis itself, but the line used at the left of the graph) [SOLVED]

2016-10-25 Thread Marc Girondot
uot;panel") # And draw both g <- ggplotGrob(p) g <- gtable_add_rows(x = g, heights = unit(2, "cm"), pos = 0) g <- gtable_add_grob(g, gl, t = 2, l=4, b=1, r=4) grid.newpage() grid.draw(g) Le 24/10/2016 à 13:08, Marc Girondot via R-help a écrit : Hello everybody, Using g

Re: [R] How to concatenate in R

2017-08-02 Thread Marc Girondot
and paste the content on a virgin sheet. If you need this code because it is homework, you should first try yourself and propose some code that produces error or unwanted results. We are not here to do your homework. Sincerely Marc -- _

Re: [R] Remove attribute from netcdf4 object

2017-08-02 Thread Marc Girondot
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- __

Re: [R] sub/grep question: extract year

2018-08-09 Thread Marc Girondot
quot;, subtext) # return 1980 subtext <- "bla 2010 bla" sub(pattern.year, "\\1\\2", subtext) # return 2010 subtext <- "bla 1010 bla" sub(pattern.year, "\\1\\2", subtext) # return bla 1010 bla subtext <- "bla 3010 bla" sub(pattern.year, "

Re: [R] A Request

2022-06-21 Thread Marc Girondot
_ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __

Re: [R] help in maximum likelihood estimation

2016-03-29 Thread Marc Girondot via R-help
Le 28/03/2016 22:19, heba eldeeb via R-help a écrit : Dear AllI'm trying to find the maximum likelihood estimator of a certain distribution using nlm command but I receive an error as: non-finite value supplied by 'nlm' can't figure out what is wrong in my function Any help? Thank you in

[R] R logo size in package information tab of Rstudio

2016-03-29 Thread Marc Girondot via R-help
Two different sizes of R logo are shown in Rstudio in the Help at the package level. For example, numderiv shows a nice discreet logo located at (in MacosX): /Library/Frameworks/R.framework/Versions/3.3/Resources/doc/html/logo.jpg whereas packrat shows a huge logo located at:

  1   2   >