Re: [R] Optimization problem with nonlinear constraint

2010-07-28 Thread Uli Kleinwechter
http://cran.r-project.org/web/packages/alabama/index.html Let me know if you run into any problems using it. Best, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Uli Kleinwechter Sent: Monday, July 26, 2010 10:16 AM To: r-

[R] Optimization problem with nonlinear constraint

2010-07-26 Thread Uli Kleinwechter
re. I also found hints to donlp2 but this does not seem to be available anymore. Any hints are welcome, Uli -- Uli Kleinwechter Agricultural and Food Policy Group (420a) University of Hohenheim D-70593 Stuttgart E-mail: u.kleinwech...@uni-hohenheim.de ___

Re: [R] Replacing NAs with 0 for variables with the same ending

2010-01-15 Thread Uli Kleinwechter
That's it, thanks a lot to all of you! Uli Henrique Dallazuanna schrieb: > In grep use: grep("x$", names(data)). > > '$' matchs 'x' in the end of string > > On Fri, Jan 15, 2010 at 11:14 AM, Uli Kleinwechter > wrote: > >&

Re: [R] Replacing NAs with 0 for variables with the same ending

2010-01-15 Thread Uli Kleinwechter
Jim Lemon schrieb: > On 01/15/2010 07:10 PM, Uli Kleinwechter wrote: >> Dear all, >> >> I'm looking for a way to replace NA's with 0 for a number of variables >> which share the same ending and which constitute a subset of a data >> frame. >> >&

[R] Replacing NAs with 0 for variables with the same ending

2010-01-15 Thread Uli Kleinwechter
of a wildcard, ie. which makes the operation being carried out for all variables "*x". I tried with grep and glob2rx but did not succeed. Many thanks for any hints! Uli Kleinwechter -- Uli Kleinwechter Agricultural and Food Policy Group (420a) Faculty of Agricultural Sciences Univer

Re: [R] Best R text editors?

2009-08-31 Thread Uli Kleinwechter
t editors? > A: ess-h...@stat.math.ethz.ch, "Liviu Andronic" > Cc: "Uli Kleinwechter" , r-help@r-project.org > Fecha: lunes 31 de agosto de 2009, 4:20 > >>>>> "LA" == Liviu > Andronic > >>>>>     on Sun, 30 Au

Re: [R] Best R text editors?

2009-08-30 Thread Uli Kleinwechter
Hi Jonathan, contributing to your poll: Also Emacs+ESS on Linux. Uli __ 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,

Re: [R] Heckman Selection Model/Inverse Mills Ratio

2009-07-12 Thread Uli Kleinwechter
Dear Saurav, If you don't wish to calculate it by hand, you can extract the Inverse Mill's Ratio using the function "invMillsRatio" from the sampleSelection package. (http://cran.r-project.org/web/packages/sampleSelection/index.html). You can also use the "heckit" function in the same packag

[R] Extracting coefficients' standard errors from linear model

2008-04-25 Thread Uli Kleinwechter
can't find out the corresponding function. Thank you very much for your help. Uli -- Uli Kleinwechter Department of Agricultural Economics and Social Sciences Faculty of Agriculture and Horticulture Humboldt University of Berlin Unter den Linden 6 D-10099 Berlin, Germany Phone: (+49) 30

Re: [R] Error when producing multiple graphes

2008-03-19 Thread Uli Kleinwechter
I just solved the problem. The error happened because of the empty variables in the dataframe. In any case, thanks for caring. bartjoosen schrieb: > Could you provide us some working codo, so that we can reproduce the error > and see what went wrong? > > > Uli Kleinwechter wrot

Re: [R] Error when producing multiple graphes

2008-03-19 Thread Uli Kleinwechter
)) barplot(table(type3m[[xn]]), main = paste ("Barplot of", xn), width=0.75,legend.text=barnamesm, xlim=c(0,4),ylim=c(0,400)) Thanks again! Uli bartjoosen schrieb: > Could you provide us some working codo, so that we can reproduce the error > and see what went wrong? > &

Re: [R] Error when producing multiple graphes

2008-03-19 Thread Uli Kleinwechter
nt barplots into ps file postscript("salelocations.ps", horizontal=FALSE) for(xn in names(type3l)) barplot(table(type3l[[xn]]), main = paste("Barplot of", xn),legend.text=barnamesloc,xlim=c(0,6)) dev.off() detach(agr1) > > Uli Kleinwechter wrote: > >> Dear a

[R] Error when producing multiple graphes

2008-03-18 Thread Uli Kleinwechter
Dear all, Within a larger script I use the following code to produce barplots for all variables contained in a dataframe "type3m": for(xn in names(type3m)) barplot(table(type3m[[xn]]), main = paste ("Barplot of", xn), width=0.75,legend.text=barnamesm, xlim=c(0,4),ylim=c(0,400)) The

[R] Creating plots for all variables in a data frame and printing them with the variable name in the main title

2008-03-17 Thread Uli Kleinwechter
Dear all, I'm just trying to create plots for all variables in a dataframe (named "x") using the following: png() apply(x,2,hist) Just as intended, it produces one plot for each variable. Unfortunately, the main title of each graph is "Histogram of newX[,i]" instead of "Histogram of name of v

[R] How to let R repeat computations over a number of variables

2008-03-14 Thread Uli Kleinwechter
Hello, I have written a small script to read a dataset, compute some basic descriptives and write them to a file (see below). The variable "maizeseedcash" of which the statistics are calculated is contained in the data frame agr_inputs. My question is whether there is a way to make R compute t