Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NRagavan opened this issue May 5, 2023 · 2 comments

Comments

@NRagavan
Copy link

NRagavan commented May 5, 2023

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?

@shaniAmare
Copy link

Not an expert, but did you see the data arrangement 3 from this tutorial? https://cran.r-project.org/web/packages/TropFishR/vignettes/lfqData.html - probably is what you want?

@NRagavan
Copy link
Author

NRagavan commented Sep 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants