Updated on R package (POT)

Hello. I had difficulty extracting my data which I imported from Excel. Previously, I use the same code but outdated version of the POT package. Earlier, the header should consist of (time, obs), and I managed to extract the data previously. However, recently after updated the package POT to 1.1-7, I could not called the same data with the same code used previously. It appears error:

Warning messages:
1: In if (!header) rlabp <- FALSE :
the condition has length > 1 and only the first element will be used
2: In if (header) { :
the condition has length > 1 and only the first element will be used

I hope someone can help me out with this problem.

Best regards!

Hi rina_tj
Welcome to the RStudio Community Forum.

It looks likely that your data has not been imported correctly from Excel (you must have achieved this using something other than the {POT} package, {readxl} maybe, or perhaps read.csv()?

Have you looked at the imported dataframe?
head(my_data)
Does it look as you expected? Has the 'time' variable been imported correctly?

If you want more detailed help you will need to post a "reprex" (reproducible example), as described here:

https://www.tidyverse.org/help/

HTH

Hello DavoWW

library(POT)
dengkil<-read.csv("D:/DATA/SF Daily SG LANGAT/SF Dengkil 19612017.csv",header=T)
Warning messages:
1: In if (!header) rlabp <- FALSE :
the condition has length > 1 and only the first element will be used
2: In if (header) { :
the condition has length > 1 and only the first element will be used

I think it has problems calling the header. However, previously, I am using the same code to extract my data and it works just fine. There is also no problem extracting data using other package, because I already try it. I think maybe the package had changed how I should assign the header name. Is it possible?

This read.csv() warning message is not related to the POT package.
Has the Excel file been edited since you last imported it? The file structure or header may have changed.

I see online that some people fixed this error by changing
header=T to header=TRUE. Can you try that?

The best way to solve this is if you can upload the .csv file so we can check the structure. If the file is large maybe just upload the first 10 lines (plus all headers).

I think I got it now. R can no longer process true function as T, instead we should use TRUE and the same goes with FALSE. Thank you so much DavoWW!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.