[R] Finding a mean value of a variable holding a dummy variable fixed

2008-03-30 Thread Alexander Ovodenko
I have time-series data on approval ratings of British Prime Ministers. The prime ministers dating from MacMillan onward till today are coded as dummy variables and the approval ratings are entered for each month. I want to know the mean value of the approval rating of each Prime Minister in the

[R] Reading data from a dataframe

2008-02-09 Thread Alexander Ovodenko
Thanks for the replies to my prior question. My problem is that R always says object not found when I enter a variable name into a command. I converted a Stata file into an Rdata file by first loading the foreign package by entering require(foreign) Then I asked R to read the Stata file by

[R] R is not reading(?) my data properly

2008-02-09 Thread Alexander Ovodenko
Thanks for the replies to my prior question. My problem is that R always says object not found when I enter a variable name into a command. I converted a Stata file into an Rdata file by first loading the foreign package by entering require(foreign) Then I asked R to read the Stata file by

[R] Question

2008-02-08 Thread Alexander Ovodenko
I have recently started learning R. I converted a Stata datafile into an R image file, but I am unable to do anything with the data. For example, I am unable to calculate the mean of any variable or create a scatterplot of some of the data. I always get a message saying, Error in plot(rgnpc,