 

Would someone mind helping with the following code:

 

1) After attaching the primary dataset

 

ambi1<-read.table("ambi.txt",header=TRUE,sep='\t')

attach(ambi1)

 

2) I would like to change na's for variable (pwd) to 0

 

pwd[is.na(pwd)]<-0

 

3) Then, I need the results of the following based on all observations.

 

sqrt(area)

m1<-lm(prs~area+sqrt(area))

summary(m1)

residuals(m1)

 

3) Next, I would like to omit na's from the rest of the dataset. I need this
truncated dataset to include 0's for variable pwd.

ambi2<-na.omit(ambi1)

 

In this process, I am overwriting step 2. Can someone help (other than
omitting na's for each column)?

 

Thanks

 

 

 

Olivia LeDee, PhD 
University of Minnesota 
Dept. of Fisheries, Wildlife and Conservation Biology 
200 Hodson Hall
1980 Folwell Avenue
St. Paul, Minnesota 55108 
  

 


	[[alternative HTML version deleted]]

