similar to: Manipulating text files

Displaying 20 results from an estimated 400 matches similar to: "Manipulating text files"

2010 Jun 02
0
DEOptim Parameters
I am trying to figure out how parameters are defined in a function that is used by DEOptim. That is, when I set upper and lower bounds for DEOptim how does it know which element of the function to apply those bounds to? For example, in DEOptim call below, when DEOptim goes into "optimfxn" how does it know what element of "optimfxn" to apply the upper and lower bounds to?
2013 Apr 10
0
Problem with ode
Hi, I am trying to run a 1D nutrient-phytoplankton-zooplankton model in R using the package 'deSolve'. The code is shown below: DEPTH = seq(2.5, 147.5, 5) NPZ = function(t, state, params){ with(as.list(params), { P <- state[1:NB] Z <- state[(NB + 1): (2*NB)] N <- state[(2*NB + 1): (3*NB)] F.I = function(z, hr){ I0 = function(hr){
2011 Apr 20
3
succession time series graph
Dear gracious R community, I would like to produce charts of phytoplankton biomass changes through time. Each species has a line, and the biomass varies in mirror form along the line for each species along the X time axis. Here is an example of what I'd like to do: http://www.er.uqam.ca/nobel/r30240/Succession.jpg Any suggestions? Thanks David Bird UQAM, Montreal
2011 Aug 16
3
Text wrap
Hi everyone. I have a long label that I would like to split. I found that I could use "strwrap" for simple text. However, this is not working with this label: str = expression(paste("< 20 ?m phytoplankton ","(cells ? ",mL^-1,")")) plot(...., ylab = strwrap(str,20),...) I suspect this is because I'm using "expression" for form my label.
2012 Sep 08
1
Thanks for helping - back to the community?
DeaR R-fellows, I got a lot of help from you concerning the generation of heat maps, so I was able to write and work with a script for this purpose at last. Some visitors of our Ecological Station asked about the generation of the graphs and so I decided to write down a small description. Is it adviseable to publish the link to the article in an R-wiki (which?) so I can give back a little to the
2012 Sep 09
1
PCA legend outside of PCA plot
Hi All, I have been trying to get to plot my PCA legend outside of the PCA plot, but success still alludes me. Can you guys please advise how I can achieve this. I used locater() to obtain coordinates for below the Comp.1 axis. Using these coordinates the legend disappears. Below is the code for the PCA and legend. Thanks in advance for the help. Regards Tinus r.cols <-
2012 Jun 15
1
DEoptim example illustrating use of fnMap parameter for enforcement of cardinality constraints
Function DEoptim in package DEoptim for differential evolution defines an optional parameter fnMap: fnMap "an optional function that will be run after each population is created, but before the population is passed to the objective function. This allows the user to impose integer/cardinality constriants." Unfortunately, there is no further documentation decribing the kind of
2013 Jan 16
1
Help with a parallel process
Hi R-Core, i am using nnet and DEoptim, Xcc=matrix(rnorm(100,0.5,0.08),50,2) Ycr=matrix(rnorm(50,0.2,0.05),50,1) pred_regm1 <- function(A) { A1=A[1] A2=A[2] A3=A[3] regm1 <- nnet(Xcc,Ycr,entropy=T,size=A1,decay=A2,maxit=2000,trace=F,Hess=T,rang=A3,skip=T) dif=sum((predict(regm1,Xcc)-Ycr)^2) return(dif) } somar=DEoptim(pred_regm1,c(1,0.00001,0.01), c(25,0.999,0.95),
2014 Sep 16
1
Changepoint analysis--is it possible to attribute changpoints to explanatory variables?
Hello, I would like to evaluate the relationship between flows and phytoplankton abundance (or Chlorophyll a concentrations) using a changepoint analysis.? Specifically, I have two study questions: Study Question 1: Are there certain flow thresholds that result in spikes in phytoplankton abundance? Study Question 2: Are the duration of certain flows important for phytoplankton abundance (e.g.,
2012 Sep 11
4
Maintaining specific order when using aggregate or change order on axis
Hi All, I'm using the following code to produce some stacked bar graphs. *setwd("C:\\Users\\Tinus\\Documents\\NMMU\\R\\Seamounts")* *SChla <- read.csv("SM_Chla_data.csv")* * * *#Extract mean values from data file* * * *Coral <- SChla[185:223,] #Reduce SChla to Coral only* *coral <- with(Coral , aggregate(cbind(Pico, Nano, Micro), list(Depth),FUN=mean))*
2011 May 09
5
Suppressing iterations in DEoptim
Dear R users, During the the running of DEoptim function which belongs to "DEoptim" package it automatically gives the output like the following: Iteration: 1 bestvalit: 181.379847 bestmemit: 0.226499 1.395852 Iteration: 2 bestvalit: 14.062649 bestmemit: 2.290357 5.597838 Iteration: 3 bestvalit: 14.062649 bestmemit: 2.290357 5.597838 Iteration: 4 bestvalit: 14.062649
2012 Dec 16
1
nls for sum of exponentials
Hi there, I am trying to fit the following model with a sum of exponentials - y ~ Ae^(-md) + B e^(-nd) + c the model has 5 parameters A, b, m, n, c I am using nls to fit the data and I am using DEoptim package to pick the most optimal start values - fm4 <- function(x) x[1] + x[2]*exp(x[3] * -dist) + x[4]*exp(x[5] * -dist) fm5 <- function(x) sum((wcorr-fm4(x))^2) fm6 <- DEoptim(fm5,
2009 Oct 01
0
DEoptim 2.0-0
Dear All, We are happy to announce the release of the new version of DEoptim (version 2.0-0) which is now available from CRAN. The DEoptim package [3] performs Differential Evolution (DE) minimization, a genetic algorithm-based optimization technique [2,3]. This allows robust minimization over a continuous (bounded or not) domain. The new DEoptim function calls a C implementation of the DE
2009 Oct 01
0
DEoptim 2.0-0
Dear All, We are happy to announce the release of the new version of DEoptim (version 2.0-0) which is now available from CRAN. The DEoptim package [3] performs Differential Evolution (DE) minimization, a genetic algorithm-based optimization technique [2,3]. This allows robust minimization over a continuous (bounded or not) domain. The new DEoptim function calls a C implementation of the DE
2007 Aug 30
0
bug in DEoptim package
(the same mail was sent to the author) When I called the function DEoptim with control=list(strategy=1) or control=list(strategy=2) I got the error: Error in mui[rtd + 1, i] : incorrect number of dimensions Analysis of the source code of the DEoptim reveals the following fragment if (con$strategy > 5) st <- con$strategy - 5 ## binomial crossover else { st <-
2008 Oct 15
1
ggplot2: sub/super-script axes labels
How are sub/superscripts designated for text in axis labels? As in this y-axis label: scale_y_continuous("Respiration, pmol O2 h-1") where the "2" needs to be subscripted and the "-1" needs to be superscripted. Thanks. Adam --------------------------------------------------- Adam G. Marsh, Ph.D. Associate Professor Marine Biological Sciences University of
2012 Dec 04
1
control point size of superscript when labeling axes with title()
Hi- A journal has asked me to make all of my text annotations on a figure at 10-point size. For the most part this is easy, e.g. by creating figures with: pdf(..., family='Times', pointsize=10) But where I have superscripts (or subscripts) in axis labels, the default seems to be to shrink the superscripted text slightly. For example this code:
2007 Aug 30
0
How to mask or escape "=" in Windows command prompt?
I have defined a function with several arguments and have it stored in the .RData file. The 'function head' is defined as follows EstimALIConc <-function(sdname,SZ,W,farea,watri,biomodel,start.part=1,nparts=20,method=c("optim","DEoptim")) { [ blah-blah-blah ] (function body doesn't matter) } Then I call Rscript: e:> rscript --restore -e
2012 Sep 10
1
Rscript installing packages
Hi there I have an Rscript and I am looking for a way to install a package non-interactively. In Rscript {Utils}, I saw an example which does something like this, however this does not seem to work for my particular example. I am trying to install the following package in an Rscript (without switching to interactive mode). res <- try(install.packages("DEoptim")) if(inherits(res,
2013 Apr 10
2
Optimization problem
As a simple example, I want to find minimum value for x^2, but it can't be obtained by: f<-function(x)x^2 optimize(f,lower=-1,upper=1) What are other methods to deal with this? I tried DEoptim, still doesn't work. Any suggustions will be extremely helpful! THanks! Shelly -- View this message in context: http://r.789695.n4.nabble.com/Optimization-problem-tp4663821.html Sent from