The R
package RMark
requires that program
MARK
be on your Mac (just the Mark.exe file). You won’t
have to run MARK
directly, we will call it from
R
. Here are the steps to follow from here
and updated there.
Install Xcode from the App Store if not already installed on your computer.
Install GCC builds and gfortran from http://hpc.sourceforge.net/ by downloading the appropriate pair of tar.gz binary files. For OS X El Capitan & Sierra these would be gcc-7.1-bin.tar.gz & gfortran-7.1-bin.tar.gz. These binaries will download into your ‘Downloads’ folder (note that this may take some time).
From here, run the following lines of code (copy and paste) in Terminal (Terminal is a command line interface that is akin to the Command Prompt in Microsoft Windows; it can be found in the Utilities folder located within your Applications folder). Be sure to pay attention to spaces, and you may be asked for your app installation password.
cd ~/Downloads
gunzip gfortran-7.1-bin.tar.gz
gunzip gcc-7.1-bin.tar.gz
sudo tar -xvf gfortran-7.1-bin.tar -C /
sudo tar -xvf gcc-7.1-bin.tar -C /
Now you are ready to download the zipped file containing the build MARK at this link http://www.phidot.org/software/mark/downloads/files/mark.osx.zip.
Extract the file mark.64.osx from mark.osx.zip (by clicking on the downloaded zip file).
Next, rename the file “mark” by deleting the .64.osx extension of the file name.
Copy the renamed mark file to the hidden folder /usr/local/bin on your computer. This folder can be accessed by opening your Terminal and copy and pasting:
open -a Finder /usr/local/bin
In Terminal, simply type “mark” (without the quotes) to make sure the file is executable. If you get the message “No input file was specified, so MARK job is done”, then everything worked!
Install the RMark
package in R
. Use the
.tar.gz install instead of the binaries. You may need to install other
packages that RMark
depends upon.
Then load the library with:
library(RMark)
data(dipper)
dipper.model <- mark(dipper)
Output summary for CJS model
Name : Phi(~1)p(~1)
Haven’t had the chance to give it a try, but we had positive feedbacks about this procedure, check out https://github.com/sjbonner/mark-on-mac
From Dāvis Ūlands
when installing mark on osx Big sur (or newer?), there is permission issue with it — when running in R I got error message like this: sh: /usr/local/bin/mark: Permission denied Error in run.mark.model(model, invisible = invisible, adjust = adjust, : To solve this, user has to change permissions to program. I used sudo chmod 755 /usr/local/bin/mark so to change permissions only to program (hopefully) not the whole bin folder. Maybee if someone else encounters those errors and can’t find solution, this helps!