[R] summing columns using partial labels

2005-04-05 Thread T Petersen
I have a dataset of the form Year tosk.fai tosk.isd tosk.gr ... tosk.total hysa.fai hysa.isd ... and so on. I want to sum all the columns using the first four letters in the columns label(e.g. 'tosk', 'hysa' etc.). How can you do that? Also, the sums should be without the

[R] Setting variable main in plot-function

2005-03-10 Thread T Petersen
if the regressions name changes to y, the title changes accordingly? Regards T Petersen __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Solving systems of non-linear equations in R

2005-02-23 Thread T Petersen
, please let me know. hope this helps. spencer graves T Petersen wrote: No, this doesn't seem right. What I look for is something that could solve nonlinear systems with n unknowns and n equations. So there will be zero degrees of freedom, and statistical methods can't be the right way

[R] Solving systems of non-linear equations in R

2005-02-22 Thread T Petersen
I'm about to write my thesis in economics and will need to setup and solve a system of non-linear equations. At our university we usually use GAMS for this, and though GAMS is a fine program, it bugs me a that I won't be able to run my code after I finish my thesis without buying a license for

Re: [R] Solving systems of non-linear equations in R

2005-02-22 Thread T Petersen
algoritm (Scarf 1967) and Merril's refinement of Scarf's algoritm in 1972, but there might be other algoritms too... Regards...TP yutaka hamaoka wrote: I believe library(systemfit) has nlsytemfit function. Yh T Petersen wrote: I'm about to write my thesis in economics and will need to setup and solve

[R] bug in example(hist)?

2005-02-20 Thread T Petersen
I tried example(hist) today, but it doesn't want to return the proper graphs ...Anyone else seeing this? I'm using R 2.0.1 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] bug in example(hist)?

2005-02-20 Thread T Petersen
of R is 2.0.1 and I'm running Windows XP. Cheers T Petersen Uwe Ligges wrote: T Petersen wrote: I tried example(hist) today, but it doesn't want to return the proper graphs ...Anyone else seeing this? T Petersen, 0) please read the posting guide, 1) please define doesn't want to return the proper

Re: [R] Barplot - Can't figure it out

2005-02-18 Thread T Petersen
(x), table(y)), beside=T) does what you want. Cheers Petr On 18 Feb 2005 at 7:51, T Petersen wrote: Almost. Catagories aren't stacked - I would like to see that x has 2 instances of 1 while y has 1 instance of 1. What's more, there are now TWO distinct barplots - the left one shows x, while

Re: [R] Barplot - Can't figure it out

2005-02-18 Thread T Petersen
Yeah, that's it. I have to catagorize the data AND tell R how many catagories there are. It works perfectly now and I've learned some more:-D Great. Achim Zeileis wrote: On Fri, 18 Feb 2005 13:00:40 +0100 T Petersen wrote: Wow, I'm getting confused...The syntax Petr suggested does what I

[R] Barplot - Can't figure it out

2005-02-17 Thread T Petersen
Hi, I have two catagorical vectors like this; x = c(1, 2, 4, 2, 1) y = c(2, 4, 2 ,4, 1) I want to set up a barplot with the catagories 1-4 horizontally and number of occurances vertically for each vector x,y. I've tried boxplot(table(x,y), beside=T) and boxplot(c(x,y), beside=T) among others,

Re: [R] Barplot - Can't figure it out

2005-02-17 Thread T Petersen
Ups, it should of course be barplot() in my mail, not boxplot:-) Kevin Wang wrote: Hi, T Petersen wrote: Hi, I have two catagorical vectors like this; x = c(1, 2, 4, 2, 1) y = c(2, 4, 2 ,4, 1) I want to set up a barplot with the catagories 1-4 horizontally and number of occurances vertically

Re: [R] Barplot - Can't figure it out

2005-02-17 Thread T Petersen
of 'height', with the values in the column giving the heights of stacked sub-bars making up the bar. If 'height' is a matrix and 'beside' is 'TRUE', then the values in each column are juxtaposed rather than stacked. -Original Message- From: T Petersen [mailto