Skip to content

How to input multi-year length frequency data in TropFishR Package for the stock assessment? #45

@NRagavan

Description

@NRagavan

I am currently conducting research on shrimp stock assessment using the ‘TropFishR’ package to analyze a monthly carapace length frequency dataset. The package allows for the analysis of one year of data, specifically data collected from January to December of a particular year. Sample code for opening the library, working with an Excel file, and opening the dataset from the working directory is provided below:

Open the TropFishR library

library(TropFishR)

Open the Excel data file

library(openxlsx)

Set the working directory where the data is located

setwd

Open the dataset in the working directory

data <- read.xlsx("frequency.xlsx")

To reproduce the result

set.seed(1)

Define the date, assuming 15 as the midpoint of sampling days

1:12 indicates data collected from January to December

-2022 indicates the year, with the remaining codes remaining the same

dates <- as.Date(paste0("15-",01:12,"-2022"),format="%d-%m-%Y")
However, if we have more than one year of data, how can we feed it into the ‘TropFishR’ package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions