similar to: constrained opt with lagrange multiplier example?

Displaying 20 results from an estimated 2000 matches similar to: "constrained opt with lagrange multiplier example?"

2004 Oct 12
2
constrained optimization using nlm/optim?
I'm looking for an example of a simple R script that impliments a contrained nonlinear function using nlm or optim. I'm not exactly sure how to impliment the constraints within the objective function that is passed to nlm/optim. obj.func <- function( p ) { x(p) <- unconstrained obj function value if( constraint1 > something ) { obj.func <- x(p) } else {
2003 Nov 06
2
created data doesn't remain when split...
I've been trying to figure out why the following is happening.... I've got some data I'll load in from a file... rm(list=ls(all=TRUE)) trees <- read.table( "c:/cruisepak/data.txt", header=T) trees$ct <- 1 And when I create some temp variable, then split the data to perform further processing, the additional column doesn't maintain the data correctly.... mtrees
2003 Dec 02
3
check WARNING...
I've been developing a package and have been getting the following warning when running the check command: * checking S3 generic/method consistency ... WARNING plot: function(x, ...) plot.summaries: function(trees, sp) * checking for replacement functions with final arg not named 'value' ... OK * checking Rd files ... OK ...blah, blah, blah... * checking examples ... OK *
2005 Mar 31
1
aggregate question...
R-folks, Is there a function, like aggregate, that allows users to bin values? I've got to break down a data frame into classes of 5cm (or something like it), and I only know how to do it using code like, signif <- symnum( stems$dbh, corr = FALSE, na = FALSE, cutpoints = c(0,10,20,30,40,999), symbols = c(0,10,20,30,40) )
2004 Nov 24
0
coplot =? gannt chart + bargraph
I would like to display some results from simulations in the form of a Gantt chart (progress) with a barchart (production) of another variable below (something very similar to coplot charts). I'm not sure if I should attempt to build this from scratch (using grid or some of the basic graphics features) or if there's a similar feature in one of the existing packages. I need to take the
2005 May 23
6
colors and palettes and things...
After trying to find if there was a color picker in the FAQs and the help, I thought I would send a post here. I was overwhelmed with all the wonderful color choices R has predefined (discovered after typing in colors()) but can't figure out what they all (by name) look like. Is there a color picker or some other method to display all those colors next to the name? I think I can put together
2011 Jan 31
1
httpd-access.log parsing and graph construction.
R gurus: I'm thinking about using R for website traffic analysis but didn't find anything in my web searches specific to R. If I have the webpages (simple example would contain something like three (3) static pages with a couple of links each) and parse the apache access log file (httpd-access.log), then I can populate the graph representing the website and perform whatever analysis I
2012 Jun 22
1
Vignettes are not being (re)built.
I'm adding a couple of vignettes to an existing package. When I make a change to the sweave file, and run the check command, c:\conifers\trunk>R CMD check rconifers I get the following message(s) in the 00check.log file: * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... WARNING Package vignette(s) without corresponding PDF:
2004 Feb 20
1
Sweave not found from MikTeX?
I've been working on a LaTeX document that contains Sweave code and cannot get MikTeX to find the Sweave.sty file. I've added the c:\rw1081\share\texmf path in the MikTeX roots (I've ven added the path in the environment variables ) but to no avail. Is there a trick to getting Sweave installed correctly when using MikTeX on Windows XP? Do I need to move/copy the Sweave.sty file to the
2004 May 12
1
summary table newbie question
I've got a newbie question and I got a little lost in the "table helps". I've got a data.frame I would like to summarize as a (and pardon for the lack of correct vernacular) data collection matrix. My data looks like, stand siteindex age acres pct.acres 1 232 116 45 8477.3105 0.56159458 2 234 121 25 11120.1530 0.73667441 3 235 132 25
2004 Jan 15
2
plotting predicted values (lines) over data?
I've been trying to plot the predicted values, as a line, over the data for a simple nonlinear fit with the following commands: plot( hg ~ ht ) ... define some function hg ~ ht + junk ... ... blah, blah, obtain parameter estimates and predicted values, blah... ... then... lines( sort( $predicted ) ~ sort( ht ) ) which results in a line that isn't smooth (which I knew would happen).
2012 Jan 11
2
package DESCRIPTION file and CRAN Task View entries?
I'm in the middle of a long overdue package update, and after seeing the CRAN Task Views I thought there would be an entry, in the DESCRIPTIONS file, for that entry that appears on the package webpage. For example, http://cran.case.edu/web/packages/vegan/index.html Since it's been some time since I've updated the package, I did a little reading (R-exts.pdf) and web searching and
2004 May 13
2
xtable without rownames
When I tried to read all the entries (after searching the FAQ) for "row names xtable", I get START-INFO-DIR-ENTRY * R FAQ: (R-FAQ). The R statistical system ... ... xtable* Export data to LaTeX and HTML tables. ... For dropping the row names of a matrix `x', it may be easier to use `rownames(x) <- NULL', similarly for column ...
2003 Nov 16
2
prevent conversion to factors in aggregate?
I've been trying to figure out how to prevent a column that is the result of an aggregate function call so that I can use it in further calculations. For example, I would like to aggregate the expf for the data.frame by sp (character) and dbh (double d=rounded to integer) using the command: > st2 <- aggregate( ntrs$expf, by=list(sp=ntrs$sp,dbh=ntrs$dbh), sum ) > st2$expf <- st2$x
2003 Nov 13
1
creating a "report" table from a set of lists
I've been trying to figure out how to accomplish the following... I've got a list (returned from a function) and I would like to "cbind()" the lists together to create a "cross tab" report or simply bind them together somehow the function returns a list that looks like the following: > all$BM $species [1] "BM" $vbar.nobs [1] 3 $vbar.sum [1] 54.05435
2004 Jan 19
1
another wish?
I've wondered why the digest version of the r-devel emails have the messages as attachments and the r-help-request have all the messages in one email (which I like MUCH better). Is it possible to send out the r-devel digest emails in the same format as the r-help-request digest emails? please, pretty please? --- Jeff D. Hamann Forest Informatics, Inc. PO Box 1421 Corvallis, Oregon USA
2005 Sep 10
1
transparent backgound in lattice plots
I couldn't find this is in the FAQs or in the R archives and I've poked around the lattice package manual, but... I've been trying to figure out how to generate graphics files with a transparent background with the lattice package. The code to generate the levelplot is fine and I can produce a simple png file with a transparent background just fine, but I'm not sure how to
2006 Mar 21
0
New version of 'systemfit'
Dear R users, The authors of the systemfit package have released a new version of this package with substantial enhancements. The systemfit package contains functions for fitting simultaneous systems of linear equations using Ordinary Least Squares (OLS), Weighted Least Squares (WLS), Seemingly Unrelated Regressions (SUR), Two-Stage Least Squares (2SLS), Weighted Two-Stage Least Squares
2006 Mar 21
0
New version of 'systemfit'
Dear R users, The authors of the systemfit package have released a new version of this package with substantial enhancements. The systemfit package contains functions for fitting simultaneous systems of linear equations using Ordinary Least Squares (OLS), Weighted Least Squares (WLS), Seemingly Unrelated Regressions (SUR), Two-Stage Least Squares (2SLS), Weighted Two-Stage Least Squares
2004 Mar 03
1
why is rcmd shlib including files not in the list?
I've been trying to create a shlib file (using mingw instead of the cygwin -- after reconfiguring my machine, yet again) and I'm getting the following behaviour that I think is incorrect: When using rcmd shlib and explicitly listing the files to include in the build such as: C:\Sequential\Code>rcmd shlib --output=optflikam flikam.c as47.f as154.f as197.f making corrAdaptiveSim.d from