similar to: problem with coding for 'optim' in R

Displaying 20 results from an estimated 200 matches similar to: "problem with coding for 'optim' in R"

2003 Jul 15
7
Excel can do what R can't?????
Hi there I thought this would be of particular interest to people using 'optim' functions and perhaps people involved with R development. I've been beaten down by R trying to get it to perform an optimization on a mass-balance model. I've written the same program in excel, and using the 'solver' function, it comes up with an answer for my variables (p, ACT, which
2003 Jul 01
2
strange error message
Hi, there I have a loop that is producing data, but is also generating an error message that I can't understand. Here's the loop and the error message: > bio<-matrix(NA, ncol=9, nrow=366) > W<-NULL > M<- length(Day) #number of days iterated > > for (i in 1:M) + { + + + if (Day[i]==1) W[i] <- Wo else W[i] <- (W[i-1]+(Gr[i]/Ef)) + + + C<-
2003 Jul 01
1
Creating a loop that works....
Hi there, First off, thanks to everyone who has helped me so far. Sorry to keep pestering you all. I'm including my code here, and I will comment down it where it is that I am having problems figuring out how to write this damn thing. > temper <- scan("temp2.dat", na.strings = ".", list(Day=0, Temp=0)) Read 366 records > > Day <- temper$Day ;
2003 Jun 30
0
Constructing loops in which i+1st element depends on ith
I feel greedy posting for help twice in one day- please forgive me, but the thesis can't wait. I have been trying to get an ?if else? statement working in a loop I am writing, in which I specify a variable value to 9.2 (Wo) on the first iteration, but for subsequent iterations, to adopt a value as a function of variables from the previous iteration. When I comment out the ?if else?
2010 Jan 30
1
Sweave - have Sexpr print 3 digits when the last is 0
Hi, I want 3 digits printed even if the last one is zero with \Sexpr{} For example: > ghg.06[12] [1] 0.2501008 I want: 0.250 What I've tried: \Sexpr{round(ghg.06[12],3)} 0.25 \Sexpr{format(ghg.06[12])} % set options(digits=3) in earlier rnw chunk 0.25 \Sexpr{round(ghg.06[12],4} %but I want 3 not 4 digits 0.2501 Thanks in advance. Elizabeth Stanny epstanny at gmail.com
2011 Jun 13
1
maintaining row connections during aggregate
Dear All, I have several sets of data such as this: year jday avg_m3s 1 1960 1 4.262307 2 1960 2 4.242308 3 1960 3 4.216923 4 1960 4 4.185385 5 1960 5 4.151538 6 1960 6 4.133846 ... There is a value for each day of multiple years. In this particular data set it goes up to 1974. I am am looking to obtain the minimum and maximum values for each year, but also know on which
2012 Aug 07
0
R enquire
Dear Madam or Mister, My name is Manuel Montesino and I am a PhD student at the University of Copenhagen. I am not a programmer myself, but my thesis requires the combined use of R and a model. I would be very grateful if you help me with the following issue; I am trying to combine a small piece of code written in Fortran 77 with R. The F77 code aims to select data from a library and write it
2011 Sep 29
1
julian day form POSIXt object
hello all, this is my reproducible example data frame test<-structure(list(date = structure(c(1262300400, 1262304000, 1262304000, 1262307600, 1262307600, 1262311200, 1262311200, 1262314800, 1262314800, 1262318400, 1262318400, 1262322000, 1262322000, 1262325600, 1262325600, 1262329200, 1262329200, 1262332800, 1262332800, 1262336400, 1262336400, 1262340000, 1262340000, 1262343600,
2009 Jul 18
5
Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
Hi, 1. I want 95% not 99% confidence intervals in my summary.Design plot using the Design package. Putting conf.int=.95 as an argument in plot does not work. The default appears to be .99 not .95 as stated in the package Design manual (p. 164). 2. My sweave chuck is below and my output is attached as well as linked here: http://www.sonoma.edu/users/s/stanny/330A/project/ciplot.pdf 3.
2005 Jun 28
0
boxplot by factor (Package base version 2.1.1) (PR#7976)
I consider this to be an old bug, which also persists in Splus 7. It is unnecessary, and annoying. ## Section 1: Consider a simple data frame with three possible factors (in levels) d <- data.frame(a=sort(rnorm(10)*10), b=factor(c(rep("A",4), rep("C", 6)), levels=c("A","B","C"))) tapply(d$a, d$b, mean) # returns three results, which I
2014 Apr 25
0
Postdoctoral position at NIST
Postdoctoral Position Announcement National Institute of Standards and Technology Gaithersburg, Maryland The National Institute of Standards and Technology (NIST) is seeking to fill a post-doctoral / guest researcher position to work on greenhouse gas emissions and dispersion modeling, including atmospheric flux inversions. As part of its Greenhouse Gas (GHG) and Climate Science Measurements
2012 Mar 26
0
Pareto frontier plots in three dimensions
Hello all This is my first posting for some years. I am back using R again and must say I do like the language (regarding scripting, I also use matlab, perl, and bash). My question involves plotting a Pareto frontier in three dimensions. This is strictly a exercise in visualization, I make no attempt to extract the Pareto set (aka dominating subset) first. EXAMPLE PLOTS For some example
2005 Jun 28
2
boxplot by factor (Package base version 2.1.1) ( PR#7976)
The issue is not with boxplot, but with split. boxplot.formula() calls boxplot(split(split(mf[[response]], mf[-response]), ...), but look at what split() returns when there are empty levels in the factor: > f <- factor(gl(3, 6), levels=1:5) > y <- rnorm(f) > split(y, f) $"1" [1] 0.4832124 1.1924811 0.3657797 1.7400198 0.5577356 0.9889520 $"2" [1] -1.1296642
2011 Dec 01
2
R, PostgresSQL and poor performance
Hi List Apologies if this isn''t the correct place for this query (I''ve tried a search of the mail archives but not had much joy). I''m running R (2.14.0) on a Mac (OSX v 10.5.8, 2.66GHz, 4GB memory) and am having a few performance issues with reading data in from a Postres database (using RPostgreSQL). My query / code are as below # -----------------------------
2015 Apr 10
0
imap doesn't like my passwd
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 9 Apr 2015, James wrote: > I took the " out of the password and it works. > The other install worked with the " in the password. pass"word is no atom and Dovecot should reject it. Maybe the former version did not checked the atoms 100% RFC conform. You can always use a litral to pass these words. > > On
2002 Sep 06
1
Main R Project and CRAN sites down?
I am still having a problem accessing CRAN here in Florida (at 9:00 AM EST Friday morning): + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a)} trying URL `http://cran.r-project.org/bin/windows/contrib/PACKAGES' unable to connect to 'cran.r-project.org'. Error in download.file(url = paste(contriburl, "PACKAGES", sep = "/"), :
2012 Jun 05
1
Merror
I have been try to work with Merror n I keep getting this message: Error in solve.default(H) : system is computationally singular: reciprocal condition number = 0 can some one please tell me what it mean and how to solve this. -- View this message in context: http://r.789695.n4.nabble.com/Merror-tp4632371.html Sent from the R help mailing list archive at Nabble.com.
2011 Jan 20
4
How to reshape wide format data.frame to long format?
Dear list, I need to convert this data.frame > names(codesM) [1] "key" "AMR.pa1.M" "AMR.pa2.M" "AMR.pa3.M" "AMR.pa4.M" [6] "AMR.pa5.M" "AMR.pa6.M" "AMR.pa7.M" "AMR.pa8.M" "AMR.pa9.M" [11] "AMR.pa10.M" "AMR.ta1.M" "AMR.ta2.M" "AMR.ta3.M"
2011 Feb 24
1
accuracy of measurements
Dear R people Could you please help with following Trying to compare accuracy of tumor size evaluation by different methods. So data looks like id true metod1 method2 ... 1 2 2 2.5 2 1.5 2 2 3 2 2 2 etc. Could you please give a hint how to deal with that. Seems like {merror} does not suite to me because I am trying to compare accuracy of measurements with their true known values not just
2005 Jan 06
6
"labels" attached to variable names
Hi, Can we attach a more descriptive "label" (I may use the wrong terminology, which would explain why I found nothing on the FAQ) to variable names, and later have an easy way to switch to these labels in plots? I fear this is not possible and one must enter this by hand as ylab and xlab when making plots. Thanks in advance, Denis Chabot