Dear R users,I wondering how I can import and extract the data of .txt format 
to the format that is compatible with RMark package for further analysis. I 
tried following example but did not work. Would you give any suggestions?

install.packages("RMark")library(RMark)
#Import table (inp format)  in R and Exportexample.1 <- 
convert.inp("http://www.montana.edu/rotella/502/deer.inp";)head(example.1)
# wanted to add the variable "states" 
(locations)example.1$state<-ifelse(row.names(example.1) > 76, c("B"), c("A"))
# to save it in txtwrite.table(example.1, "testing.txt", row.names=F, sep = 
"\t")
# import the txt file data<-import.chdata("testing.txt", 
field.names=c("ch","freq","states"), 
header=FALSE)data<-data[-1,]mstrata.processed=process.data(data, 
model="Multistrata")# it did not work
# to export the data into inp formatexport.chdata(mstrata.processed, 
filename="testing")

Thanks Kristi
                                                                                
  
        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to