[R] abline

2004-03-08 Thread Grace Conlon
if I want to specify y-coordinates for the heights of horizontal lines to go across a 
plot.
 
x - c(1,2,3,6,4,8,4,7)
y - c(3,2,7,4,5,4,5,6)
h - c(3,5,7)
plot(x,y)
abline(y=h)

However I got error message:
Warning message: 
parameter y couldn't be set in high-level plot() function 
(I tried abline(h=y) , it;s not what I want also)

Do u know why?
 


-


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] missing values

2004-03-07 Thread Grace Conlon
How can I deal with missing values in the excel file? 
I used read.csv to imports data, how ever there are missing values in the csv file. 
When I use names(), it turns out a error message:  names attribute must be the same 
length as the vector 
What can i do with the missing values?
Thanks


-


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Excel files

2004-03-07 Thread Grace Conlon
Hello,
 
I was trying to import data from an Excel file. After I imported the data, I was 
trying to make a scatter plot. 
 
The X axes variable is a time variable, which occupies two columns, one is date, 
another one is time. Example 21-Apr-03, 4:10 PM.   My qestion is:
 
1. How can I access the data of certain column? I mean how can I refer it in R?
2. How can I make the two column character values(the time variable I mentioned) to 
the X ases values?
3. If I have three variables, one is y axes, one is x axes,  the third one is a logic 
var, how can I make the logic varaible on the plot also?
4. I have a column of number values, however I want to creat a new column, the value 
of each cell is the average of every 10 values of the first column. How can I do it in 
R?
 
I tried to figure it out in the help section, however, it spent me a lot of times, I 
still can not get the way out, please help. THank you!



-


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] How to read Excel file and access the data item?

2004-03-03 Thread Grace Conlon
In R, How to read Excel file and access the data item?
Thank you.


-

Yahoo! Search - Find what you’re looking for faster.
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Matrix mulitplication

2004-02-16 Thread Grace Conlon
ABCD are four matrix.
A * Inverse((Transpose(A)*Tranpose(B)*B*A+C)) * Transpose(A) * Transpose(B) * D
 
how to write in R in an efficient way?


-


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html