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] How to concatenate in R

2017-08-02 Thread Marc Girondot
ntent 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] 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

[R] How get list element name in R 3.2.0

2015-04-26 Thread Marc Girondot
;symbol' d'indice incorrect 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 functio

[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", lib.loc="/Library/Frameworks/R.framework/Versions/3.2/Resources/

[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] Error not reported while checking package "as cran"

2015-06-29 Thread Marc Girondot
" and you need to install a > more recent one. > > Henrik > > On Jun 29, 2015 1:49 AM, "Marc Girondot" <mailto:marc_...@yahoo.fr>> wrote: > > Dear members, > > I have submitted to CRAN a new version of a package yesterday > after

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 ca

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 ca

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, "

[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
27;", stderr = FALSE, stdout=TRUE), envir=globalenv()), silent=TRUE) > pathfile [1] "" > try({pathfile <<- system2(command="find", args="$HOME -type f -name 'PuertoSanJose.csv'", stderr = FALSE, stdout=TRUE)}, silent=TRUE) > pathfi

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 yo

[R] Update package dor r-devlop

2014-10-11 Thread Marc Girondot
====== downloaded 741 Kb It works well. It seems at .tgz is not available in CRAN mirror. It is normal ? Is it a way to force .tar.gz to be used ? Thanks Marc Girondot __ R-help@r-project.org mailing

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 co

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

[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
essai*.txt") read Function used to read 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:/&

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 I agree that LDL is a special case of what could be named ODL (Out of detection limit). To answer to Bert Gunter, indeed if LDL (or ODL) values are changed into NA, the results will

[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 | rf]

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() library("Helpers

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] 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
egend), "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

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] Masking oceans using polypath

2013-08-05 Thread Marc Girondot
code 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=

Re: [R] help with adding SD to graph

2013-08-13 Thread Marc Girondot
r x <- 1:100 plot_errbar(x=1:100, rnorm(100, 1, 2), 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, > >

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] Package check using --as-cran

2013-01-02 Thread Marc Girondot
3.43’ * checking CRAN incoming feasibility ... OK Maintainer: ‘Marc Girondot ’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checkin

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]/pheno

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
ks fine with the spaces if the check is done without the --as-cran option. Confusing ! Thanks a lot for your help, Marc -- ______ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Co

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

2013-01-14 Thread Marc Girondot
not what I expected. Plot with date object seems to use a special way to generate ticks. Thanks a lot Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés

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

2013-01-14 Thread Marc Girondot
C_TIME", locale="") [1] "fr_FR.UTF-8" Thanks a lot Marc (I post the solution 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, Pasc

Re: [R] different color indicates difference magnitude

2013-03-13 Thread Marc Girondot
ol/10, bty="n") plot(x, y, col=nbcol[128-zcol], pch=".", cex=10, bty="n") Sincerly Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Com

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

2013-03-13 Thread Marc Girondot
elp > will be greatly appreciated! > > 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

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

2013-03-13 Thread Marc Girondot
myColorRamp(c(topo.colors(10)),z) > scatterplot3d(x,y,z, pch=16,color=cols, grid=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 great

Re: [R] boxplot

2013-03-14 Thread Marc Girondot
ing-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 Univers

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

2013-03-14 Thread Marc Girondot
nth)201103`\"" > cat(x) "`Year_Month)201103`" > cat(gsub("`", "", x)) "Year_Month)201103" Sincerely Marc -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Co

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

2013-03-14 Thread Marc Girondot
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

Re: [R] column and line graphs in R

2013-03-14 Thread Marc Girondot
0.083 MOTU16 0.0590.167 MOTU17 0.0340.083 MOTU18 0.0490.083 MOTU19 0.0840.333 MOTU20 0.0150.083 MOTU21 0.0590.083 MOTU22 0.0320.167 MOTU23 0.1420.250 MOTU24 0.0310.083 MOTU25 0.0340.083 MOTU29 0.0100.083 MOTU3

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

2013-03-15 Thread Marc Girondot
help! thanks, Z -- ______ 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.3

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

2013-03-16 Thread Marc Girondot
//www.bing.com";), stringsAsFactors = FALSE) cat("Choose an option:\n", paste(1:2, links[,1],"\n")) f<-scan(nmax=1, quiet=TRUE) browseURL(links[f,2]) Sincerely Marc -- __ Marc Girondot, Pr

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

2013-03-16 Thread Marc Girondot
;String">http://www.google.com 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 1

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

2013-03-19 Thread Marc Girondot
ngth=100), result2$par[3], result2$par[4]), col="blue") Sincerely Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS,

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

Re: [R] highlight overlapping region of two densities

2013-03-20 Thread Marc Girondot
lt;- density(myd)$y d1x <- density(myd1)$x d1y <- 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

Re: [R] trouble with data frame

2013-03-22 Thread Marc Girondot
d with the as.numeric. Perhaps with n<-as.numeric(df[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 Unive

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 Mar

[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
"n", las=1) axis(1, at=seq(from=as.Date("2000-01-01"), to=as.Date("2006-12-31"), by="1 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:200

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

2013-04-06 Thread Marc Girondot
axt="n", las=1) axis(1, at=seq(from=as.Date("2000-01-01"), to=as.Date("2006-12-31"), by="1 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=FALSE, lwd=

Re: [R] Problem with caret

2013-04-11 Thread Marc Girondot
erely 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, F

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

2013-04-12 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

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

2013-04-16 Thread Marc Girondot
;- Sys.time() k <- k+1 } } 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 C

[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' Cont

[R] Loading of package RNetCDF fails

2013-04-27 Thread Marc Girondot
: .onLoad a échoué dans 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 MacOS

[R] Question about fitting a periodic model in glmm

2013-05-07 Thread Marc Girondot
fect (one for sin and one for cos). How can I combine these two p-values to get a global effect of periodic effect ? - If I want to setup interaction between periodic effect of "days" and "covariate", how I can do as "days" appears in two effects (sin and cos) ?

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
ust 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 Conser

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

2014-04-06 Thread Marc Girondot
install.packages("ncdf4", type="source") ERROR: 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, Mar

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 in

[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) pl

[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, FUN=funct

Re: [R] efficient sine interpolation

2014-05-12 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 temperatu

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

2014-06-08 Thread Marc Girondot
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(

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 :

[R] How to create as.numeric.xxx

2012-11-16 Thread Marc Girondot
same with as.numeric: as.numeric.essai <- function(x, ...) {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

[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

Re: [R] fitting

2012-11-16 Thread Marc Girondot
Le 16/11/12 11:49, Meli Massimiliano a écrit : Hello All, i would fit my data with a function like this : y = a0 + a1 * exp(-x/a2) + a3 * exp(-x/a4) + a5 * exp(-x/a6) + a7 * exp(-x/a8) + a9 * exp(-x/a10) plus i have to impose that a1 + a3 + a5 + a7 + a9 = 1 a1 , a3 , a5 , a7 , a9 >= 0 The

Re: [R] how to create a tree in R

2012-11-17 Thread Marc Girondot
. Furthermore, there is a package "tree". Look inside and the example code to know if it does what you want. After ask for specific questions. Sincerely Marc Girondot __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

[R] Trick to replace NA

2012-11-22 Thread Marc Girondot
)], a[2:l])} 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, AgroPar

Re: [R] cosine curve fit

2012-11-27 Thread Marc Girondot
rely 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 (0)1.69.15.72.30 Fa

Re: [R] Problem with barplot

2014-01-11 Thread Marc Girondot
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
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, Mar

Re: [R] Errorbar

2014-02-21 Thread Marc Girondot
m=c(1,100), errbar.x=2, errbar.y=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="iden

[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 t

Re: [R] Import multiple files into R

2014-03-20 Thread Marc Girondot
n the files of the folder (directory for windows 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

[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 und

[R] Depends and Imports in DESCRIPTION file

2013-10-22 Thread Marc Girondot
e fields. 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 Evolut

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: x

[R] dgamma in jags within r

2011-09-10 Thread Marc Girondot
lot(x, dgamma(x, shape=jagsr, rate=jagsmu), type="l", axes=FALSE, col="red", xlab="", ylab="") Probably something trivial is wrong but I do not see what. -- __ Marc Girondot, Pr Laboratoire Ecolo

Re: [R] Month Difference

2012-09-07 Thread Marc Girondot
quot;months"))-1 + seeq + } x <- c("1981-12-01") y <- c("1990-05-01") indicemonth <- num.months ( x , y ) Sincerely Marc Girondot -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématiqu

Re: [R] Poor performance of "Optim"

2011-10-01 Thread Marc Girondot
hat non-linear optimization is a complex world ! 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 Ce

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: library(zoo)

[R] assign a value to an element

2012-03-18 Thread Marc Girondot
o it cannot be used to set elements of vectors, names, attributes, etc. I have found 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 M

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

2012-04-01 Thread Marc Girondot
="BFGS", hessian=FALSE, control=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

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

2012-04-03 Thread Marc Girondot
ld") Erreur dans library("HelloWorld") : ‘HelloWorld’ n'est pas un nom correct de package installé Whereas the Helloworld folder is available in the library folder with other packages /Library/Frameworks/R.framework/Versions/2.14/Resources/library/HelloWorld -- __

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

2012-04-03 Thread Marc Girondot
’ (as ‘lib’ is unspecified) > library("HelloWorld") Erreur dans library("HelloWorld") : ‘HelloWorld’ n'est pas un nom correct de package installé Whereas the Helloworld folder is available in the library folder with other packages /Library/Frameworks/R.framewo

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

2012-04-03 Thread Marc Girondot
:50 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";, >> >> >> "H

[R] Indistinguishable balls into distinguishable boxes

2012-02-03 Thread Marc Girondot
110 6 101 7 011 41200 5 020 6100 2 -- __ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, Agro

Re: [R] extract data from square cracket

2012-05-16 Thread Marc Girondot
;noband", 6), rep("band", 2 d<- data.frame(cbind(d, col3=c("[0.86]", "[0.93]", "[0.95]", "[0.91]", "[0.89]", "[0.84]", "[0.89]", "[0.80]", "[0.75]", "[0.93]"))) as.numeric(g

Re: [R] Optimization inconsistencies

2012-05-18 Thread Marc Girondot
7;t know why in this case 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é Par

[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 numbe

Re: [R] chi-square distribution table

2017-12-19 Thread Marc Girondot via R-help
Le 18/12/2017 à 15:41, HATMZAHARNA via R-help a écrit : Please could you tell me how to make code to make chi-square distribution table? Please help __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/lis

  1   2   >