Error in strip.comments

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Error in strip.comments

Postby tasha » Tue Dec 16, 2014 5:28 pm

Hello, I have used Rmark several times however I am trying to run a new model and I keep getting the following message "Error in strip.comments (filename, use.comments = use.comments, header = header) when I run the following script :

Periphery_Abundance=import.chdata("C:/Users/Periphery Abundance 2008 2014.txt",
field.types=c("f","f","f"))

My txt data file looks like this:

ch freq plot colony
/* 142645345A*/ 00000000010000010000001000000001 1 LA-07 Larson ;

I have used data files formatted the same way in the past that will run but no luck with the new files. The old and new files look as though they are formatted the same way (I can't remember exact steps I used to format the old files). I have re-read the mark manual and created the new files in excel then cut and pasted the data into Notepad++ and I have also tried saving the excel file as a txt but I consistently get the same error message.
I feel like I may be missing something obvious ... any suggestions as to what I should try next would be most appreciated!

Thanks
Tara
tasha
 
Posts: 19
Joined: Thu Apr 01, 2010 9:37 pm

Re: Error in strip.comments

Postby jlaake » Tue Dec 16, 2014 5:52 pm

Tara-

What was the error message? Something must have followed after the Error in strip.comments. I put the record showed in your post in a file and copied it several times with different comment values and it worked fine. Send me the file offlist jefflaake@gmail.com and I'll look at it.

--jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Error in strip.comments

Postby jlaake » Mon Dec 22, 2014 5:52 pm

This was a case of a bad file name and she missed the rest of the error message that followed the generic R error message. For the next version, I have changed the code to make this error more explicit and clear.

Note that when R code uses the stop function, R first states that there was an error in a particular function and then on the following line it shows the error message contained in the stop function. That second line contains the reason for the error.

regards --jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest