HI, nuru<- read.table("NS.diet.txt",header=TRUE,stringsAsFactors=FALSE,sep="\t",fill=TRUE,check.names=FALSE)
colnames(nuru) # [1] "Species" "Fish ID" "Date" #[4] "Time" "Depth (m)" "Haul.No." #[7] "Longitude" "Latitude" "Stat.Rect" #[10] "hake.length" "Tot.Weight (g)" "Maturity" #[13] "Sex" "Stomach contents(1/0)" "Gutted.Weight (g)" plot(diet~class.f, data=nuru) ## `diet` and `class.f` columns are not found in the dataset. A.K. ----- Original Message ----- From: "Garkuwa, Nuru Adamu" <nuru.garkuwa...@aberdeen.ac.uk> To: "r-help@r-project.org" <r-help@r-project.org> Cc: Sent: Tuesday, August 20, 2013 1:52 PM Subject: [R] rcode problem Hi, Please find attached rcode and my data.There seems to be a problem in the following rcodes: plot(diet~class.f, data=nuru) points(pred.mod1~midpoints,type="b") please I need your help. Kind Regards, Nuru ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.