MWTextract: Read in data from a Microwave Telemetry Inc. fish report from...

Description Usage Arguments Value Author(s) References Examples

Description

Reads in all data from a Microwave Telemetry Inc. fish report and parses all pieces into a list. Currently, the only information not readin is the light based locations while the PSAT tag is floating at the surface. This function uses the RODBC library and several sub functions to connect to an excel file and read in the contents. This does not work for Linux users. If ODBC=F, the gdata package is used to extract information. While this is appreciably slower to implement, it it now cross platform.

Usage

1
MWTextract(tagID, tyear, xlsfile, taglocfile, delta = F, minmax = F, odbc = F)

Arguments

tagID

PTT number or other unique identifier of the tag to be read in. Must be of class 'character'

tyear

Year the fish was tagged. Must be of class 'numeric'

xlsfile

Fish report from MTI containing all your valuable data.

taglocfile

A text file containing tagging date and location in the following columns: Id, Year, Month, Day, Longitude (-180 to 180), Latitude. Do not use a header.

delta

Flag to remove delta limited values in Depth and temperature

minmax

Flag to import minimum and maximum temperatures from newer MTI fish reports

odbc

If working on a windows system, flag to use ODBC connectivity. If on Linux, leave this False.

Value

A list with the following:

x0

Tagging Location

day0

Tagging date of Class 'date'

day0b

Tagging date of Class 'POSIXct'

xT

pop-off location

dayT

pop-off Date of Class 'date'

dayTb

pop-off Date of Class 'POSIXct'

fulldates

Alldates fish was at liberty of Class 'date'. This does not neccesarily correspond to how many days of data are returned

SRSS

Data frame of Sunrise and Sunset times. Columns are: Date, Sunrise and Sunset with SR and SS in minutes past midnight. Date is of Class'date'

MWTxy

Data Frame of Microwave Telemetry produced light based geolocations and corresponding dates. Columns are: Year, Month, Day,Latitude and Longitude (-180 to 180)

T

Matrix of ambient temperatures. Columns correspond to time of day GMT (typically 0-23.75 hours) and Rows corrspond to days at liberty. This matrix contains both observations and any times missing observations

Z

Matrix of depth. Columns correspond to time of day GMT (typically 0-23.75 hours) and Rows corrspond to days at liberty. This matrix contains both observations and any times missing observations

Argos

Data Frame of Argos data returned while tag was floating. Columns are: Date-Time (character class), Argos Location Class, Latitude and Longitude.

Author(s)

Benajmin Galuardi

References

This framework was modified from work done by Francois Royer during his post-doc at the Large Pelagics Research Center.

Examples

1
2
3
4
5
6
7
8
Mydir = 'C:/MYDATA/';   # Data arranged by year in the DATA folder
tyear = 2008;						  # Year fish was tagged 
taglocfile = paste(Mydir, 'Tagginglocations.txt', sep = "");	# ASCII file containing Tag ID,  year,  month,  day,  longitude and latitude of tagging locations. This is neccesary in order to properly read in the data.
tagID = '12345'
tyear = 2008
xlsfile = paste('Mydir', tyear, tagID, tagID, '.xls', sep = "/")

tagdata <- MWTextract(tagID, tyear, xlsfile, taglocfile)

galuardi/analyzepsat documentation built on May 17, 2019, 3:25 p.m.