Displaying 2 results from an estimated 2 matches for "terji78".
2005 Feb 18
3
Barplot - Can't figure it out
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, but can't get it to work...Any ideas? I'd apppreciate any help
2005 Feb 16
1
Setting log(0) to 0
Hi,
I'm trying to do a regression like this:
wage.r = lm( log(WAGE) ~ log(EXPER)
where EXPER is an integer that goes from 0 to about 50. EXPER contains
some zeros, so you can't take its log, and the above regression
therefore fails. I would like to make R accept log(0) as 0, is that
possible? Or do I have first have to turn the 0's into 1's to be able to
do the above