Page 1 of 1

issues with MarkViewer in Os X 10.10.2

PostPosted: Wed Feb 04, 2015 8:30 pm
by aber_r16
Hi,

I am determined to get RMark and Mark working together on Mac OS X 10.10.2 (Yosemite). I believe I have it mostly working by following these instructions (found in this forum via Arpat).

The example analysis are working as far as I can tell, however I can not set the MarkViewer. I have followed the instructions at http://www.phidot.org/software/mark/rmark/linux/ however MarkViewer="nano" does not work.

While working through the dipper examples I try

CODE: SELECT ALL
library(RMark)
MarkViewer="nano"
data(dipper)
myexample<-mark(dipper)
myexample


which looks like it runs everything fine but results in this error

Error opening terminal: unknown.

The Mark output files are where they should be, I can open them independently from R.

Any suggestions as to correctly redefine the MarkViewer?

Thanks, Robin

Re: issues with MarkViewer in Os X 10.10.2

PostPosted: Mon Feb 09, 2015 12:38 pm
by jlaake
You'll have to get help from someone that knows this operating system. Have you tried the system function in R to get to nano. Once you understand that then look at the following code in print.mark

Code: Select all
   os=R.Version()$os
   if(!exists("MarkViewer"))
     if(os=="mingw32")
        MarkViewer="notepad"
     else
        MarkViewer="pico"
#
#  If the model has been run (model$output exists) extract to temp file dummy.xxx and
#  call notepad to view it; any program could be used in its place. The temp file is immediately deleted
#  9 Jan 06; changed such that model$output is just the baseline value of the filename
#
#  def.options=options()
#  options(useFancyQuotes=FALSE)
  model=load.model(x)
  if(!input)
  {
      if(!is.null(model$output))
      {
         if(file.exists(paste(model$output,".out",sep="")))
         {
            if(os=="mingw32")
               system(paste(shQuote(MarkViewer),paste(model$output,".out",sep="")),invisible=FALSE,wait=FALSE)
            else
               system(paste(MarkViewer,paste(model$output,".out",sep="")),wait=FALSE)
         }
         else
            cat(paste("Cannot locate file ",model$output,".out\n",sep=""))
      }else
        print.default(model)
  }
  else
  {
      if(!is.null(model$output))
      {
         if(file.exists(paste(model$output,".inp",sep="")))
         {
            if(os=="mingw32")
               system(paste(shQuote(MarkViewer),paste(model$output,".inp",sep="")),invisible=FALSE,wait=FALSE)
            else
               system(paste(MarkViewer,paste(model$output,".inp",sep="")),wait=FALSE)
         }
         else
            cat(paste("Cannot locate file ",model$output,".inp\n",sep=""))
      }else
        print.default(model)
  }

#   options(def.options)
   invisible()
}

Re: issues with MarkViewer in Os X 10.10.2

PostPosted: Mon Jun 22, 2015 4:20 pm
by Drew Ricketts
aber_r16, were you able to get the MarkViewer command to work on your Mac? I have everything else working…

Thanks

Re: issues with MarkViewer in Os X 10.10.2

PostPosted: Fri Jun 26, 2015 11:43 am
by Drew Ricketts
Arpat figured this out, and posted the solution on the following thread:

viewtopic.php?f=21&t=3064