To download an R file

Some useful tips for downloading .R files and .dat file
for the class assignments
PC users:
To download an R file (file names ending with .R) or a data file (file names ending with .dat)
using a PC running Windows do the following:
Firefox or Safari:
(1) Open a web browser window
(2) Go to the class web site http://ic.ucsc.edu/~ammoore/ocea90 and select the folder that
you want (e.g. R or ASSIGNMENTS)
(3) Using your mouse or touch pad, position the cursor over the highlighted link to the
desired file name (e.g. brownian_motion.R) and right click. Select “Save link as…” from
the drop down menu that appears.
(4) Select the name of the folder where you want to save the file (e.g. R_INTRO or HW1)
(5) At this point you should find that the desired file is in the desired folder.
Chrome:
(1) Open a web browser window
(2) Go to the class web site http://ic.ucsc.edu/~ammoore/ocea90 and select the folder that
you want (e.g. R or ASSIGNMENTS)
(3) Using your mouse or touch pad, highlight the desired file name (e.g. brownian_motion.R)
and right click, but do not open the file. Select “Save link as…” from the drop down
menu that appears.
(4) Select the name of the folder where you want to save the file (e.g. R_INTRO or HW1)
(5) At this point you should find that the desired file is in the desired folder.
Mac users:
To download an R (file names ending with .R) or a data file (file names ending with .dat) using a
Mac do the following:
Firefox or Safari:
(1) Open a web browser window
(2) Go to the class web site http://ic.ucsc.edu/~ammoore/ocea90 and select the folder that
you want (e.g. R or ASSIGNMENTS)
1 (3) Using your mouse or touch pad, position the cursor over the highlighted link to the
desired file name (e.g. brownian_motion.R) and left or right click. This will open the file
in the browser window.
(4) From the “File” menu tab at the top of your web browser select “Save As…” from the
drop down menu that appears.
(5) Select the name of the folder where you want to save the file (e.g. R_INTRO or HW1).
WARNING: Mac’s have a habit of appending “.txt” to the end of any file with a format
that they do not recognize (e.g. the example file brownian_motion.R may be saved as
brownian_motion.R.txt). This is likely to happen with the files that have names that end
with .R and .dat that you will be using for the class assignments. It is very important that
you DO NOT let your Mac append a “.txt” to the end of any file. If this happens the R
programs will not be recognized by R and/or the data files that each program reads will
not be recognized when you try to run it. Your Mac will usually give you the option of
overriding the “.txt” append or you can manually remove the “.txt” part of the name in
the “Save As” dialogue box.
(6) If you do inadvertently save any file with “.txt” appended to the end of the name you
MUST rename immediately it to remove the “.txt” suffix and restore the original name.
(7) At this point you should find that the desired file is in the desired directory.
Chrome:
(1) Open a web browser window
(2) Go to the class web site http://ic.ucsc.edu/~ammoore/ocea90 and select the folder that
you want (e.g. R or ASSIGNMENTS)
(3) Using your mouse or touch pad, highlight the desired file name (e.g. brownian_motion.R)
and left or right click, but do not open the file.
(4) From the “File” menu tab at the top of your web browser select “Save Link As…” or
“Save Page As…” from the drop down menu that appears.
(5) Select the name of the folder where you want to save the file (e.g. R_INTRO or HW1).
WARNING: Mac’s have a habit of appending “.txt” to the end of any file with a format
that they do not recognize (e.g. the example file brownian_motion.R may be saved as
brownian_motion.R.txt). This is likely to happen with the files that have names that end
with .R and .dat that you will be using for the class assignments. It is very important that
you DO NOT let your Mac append a “.txt” to the end of any file. If this happens the R
programs will not be recognized by R and/or the data files that each program reads will
not be recognized when you try to run it. Your Mac will usually give you the option of
overriding the “.txt” append or you can manually remove the “.txt” part of the name in
the “Save As” dialogue box.
(6) If you do inadvertently save any file with “.txt” appended to the end of the name you
MUST rename immediately it to remove the “.txt” suffix and restore the original name.
(7) At this point you should find that the desired file is in the desired directory.
2