KaiHsiangHu / iNEXT.4steps

Four-Step Biodiversity Analysis Based on iNEXT
3 stars 5 forks source link

iNEXT.4steps for "incidence_raw" data #3

Open siyuRad opened 3 years ago

siyuRad commented 3 years ago

Dear Kai HsiangHu,

I am a PhD student from Australia. I used the iNEXT for my research. As the new paper of your team published (Anne Chao's No. 135 publication) I am trying to use the iNEXT.4steps instead of iNEXT. My data are entered in multiple sheets of an Excel workbook. So I use the following commands.

path <- "C:/Users/uqpperer/Dropbox/GOBE/Radiolarian stat/Chapter 5/Binary data sheet Sa_Ka.xlsx" D2_ANALYSIS <- excel_sheets(path)%>% # Get sheet names set_names()%>% # Name sheets names with themselves map(read_excel, path = path)%>% # Read each sheet into a list
map(column_to_rownames, var = "...1") # Use first column as row names

D2_FINAL <- iNEXT4steps(D2_ANALYSIS, diversity = "TD", datatype = "incidence_raw", nT = NULL) Then I get the following warning.

Error in as.incfreq(data, nT = nT) : could not find function "as.incfreq"

I tried to put the number of sampling units for the 2 sheets of my data as nT = c(4, 9) It also generated the same warning.

Could you please help me solve this issue? Is my species by sampling units matrix wrong?

Thank you very much for your time in helping me. Binary data sheet Sa_Ka.xlsx

KaiHsiangHu commented 3 years ago

Dear siyuRad: Sorry there is a error of iNEXT.4steps.  I have modified it from github.  Please re-download it from my github, sorry.I'm so glad that you use our testing package.

Best wish K-H Hu

siyuRad commented 3 years ago

Many thanks for modifying it. I re-downloaded. And still it is as below.

DR_FINAL <- iNEXT4steps(DR_ANALYSIS, diversity = "TD", datatype = "incidence_raw", nT=c(4,9)) Error in as.incfreq(data, nT = nT) : unused argument (nT = nT)

My first sheet has 4 sampling units, the second one has 9 sampling units. Did I enter the values for the nT argument incorrectly?

Thank you for your time K-H Hu!!

KaiHsiangHu commented 3 years ago

Dear siyuRad: I'm so sorry. I also modified the package 'iNEXT.3D' an hour ago. I think maybe this error is from other package 'iNEXT.3D'. Please re-download 'iNEXT.3D' from my github or AnneChao's. I'm really so sorry.

'nT' only need when your 'incidence-raw' data is in the class 'matrix' or 'data.frame'. If your data is in 'list', you don't need to specify.

Thank you very much.

Best wish Wish to hear good news from you. K-H Hu

siyuRad commented 3 years ago

Dear K-H Hu,

I find another warning after redownloading iNEXT.3D and iNEXT4steps. warnings are generated for all 5 lists of mine I think.

library(iNEXT.3D) library(iNEXT.4steps) TRY1 <- iNEXT4steps(D_C_ANALYSIS, diversity = "TD", datatype = "incidence_raw", nboot = 50) Warning messages: 1: guides(<scale> = FALSE) is deprecated. Please use guides(<scale> = "none") instead. 2: guides(<scale> = FALSE) is deprecated. Please use guides(<scale> = "none") instead. 3: guides(<scale> = FALSE) is deprecated. Please use guides(<scale> = "none") instead. 4: guides(<scale> = FALSE) is deprecated. Please use guides(<scale> = "none") instead. 5: guides(<scale> = FALSE) is deprecated. Please use guides(<scale> = "none") instead.

Also is there a way to create the plots for $AsyEst values in iNEXT (asymptotic estimates of diversity profiles) package?

Thank you very much!!!

KaiHsiangHu commented 3 years ago

Dear siyuRad: I think these warnings are caused by the figures function (ggiNEXT3D, ggasy3D). I'm not sure the exact problem, sorry.

Another, if you want to plot asymptotic estimates of diversity q-profiles, you can try to use 'asy3D', 'ggasy3D' in the package 'iNEXT.3D'.

Best wishes

siyuRad commented 3 years ago

Dear K-H Hu, Many thanks for suggesting asy3D, ggasy3D in iNEXT.3D. I generated asymptotic estimates of diversity for q profiles. For the time being, I will use iNEXT until I can solve the errors in iNEXT.4steps.

Thanks a lot for helping me!!!