The answers to your questions are in the text below. However these questions 
are generally answered in the base documentation. You might try going through 
the Keywords by Topic which on the windows system at least) is accessed by 
going through the html help entry on the help menu. Once your browser is open 
select "Search Engine & Keywords." Depending on how your browser is set up you 
may have to scroll down to the keywords. I found it helpful to browse through 
the categories to get a feel for what R can do.



> -----Original Message-----
> From: Cuichang Zhao [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 25 January 2005 3:25 PM
> To: [email protected]
> Subject: [R] more question
> 
> 
> Hello, 
> thank you very much for your help in last email. it is very 
> helpful. right now, i have more questions about my project,
>  
> 1. solve can i remove the NA from a vectors:
> for exmample, if my vector is:
> v <- (NA, 1, 2, 3, 4, 5)
> how can I remove the NA from vector v

Assuming you meant v <- c(NA, 1, 2, 3, 4, 5)

then

v[!is.na(v)]

An introduction to R, Page 10 gives an example 
>  
> 2. how I can get input from the user?

Page 279 of the Full reference Manual
?readline

fun <- function() {
       ANSWER <- readline("Are you a satisfied R user? ")
       if (substr(ANSWER, 1, 1) == "n")
         cat("This is impossible.  YOU LIED!\n")
       else
         cat("I knew it.\n")
     }
fun()

>  
> 3. can I read more than one data files in one program? and 
> how i can write something to a file

Yes, The whole document R Data Import/Export is devoted to this topic. There 
are too many ways to answer this question. 

>  
> 4. how i can display/output something on the screen?


cat("something")
print("something")
plot(5)
plot(v)

Try searching for device in the Full reference manual, if you are interested in 
the various ways output mechanisms.

I think you need to be more precise in your question.
>  
> thank you so much
>  
> Best wish
>  
> C-Ming
>  
> Jan 24, 2005
>  
>  
> 
>               
> ---------------------------------
> 
> 
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>

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

Reply via email to