Skip to content

unclear message when running cSplit() #71

Open

Description

@yuliaUU

I have written a code that uses cSplit function to separate a column in the data frame into multiple columns. Below is the reproducible example:

mtcars %>% rownames_to_column() %>% cSplit(., 'rowname', ' ')

Since I updated to R version 4.1.0. And after that the following code produces the following warning message that I was unable to resolve:

Warning messages:
1: In type.convert.default(X[[i]], ...) :
  'as.is' should be specified by the caller; using TRUE
2: In type.convert.default(X[[i]], ...) :
  'as.is' should be specified by the caller; using TRUE
3: In type.convert.default(X[[i]], ...) :
  'as.is' should be specified by the caller; using TRUE

I actually identified where the warning coming from:
it is from the default value of type.convert=TRUE.

But I am not sure why it is producing the warning, and what I should do ( I do want the type.convert to be set to TUE)

Activity

  1. mrdwab commented on May 25, 2021

    @mrdwab
    Owner

    @yuliaUU Thanks for raising the issue. It appears to be related to changes to type.convert in R 4.1. Here's the relevant part from the release notes:

    type.convert() now warns when its as.is argument is not specified, as the help file always said it should. In that case, the default is changed to TRUE in line with its change in read.table() (related to stringsAsFactor) in R 4.0.0.

    I'll look into it shortly and try to get an update on CRAN. The warning should not affect the performance though.

  2. self-assigned this
    on May 25, 2021
  3. yuliaUU commented on May 25, 2021

    @yuliaUU
    Author

    yes! the function works perfectly! Thanks a lot for your prompt response

  4. GaborioSensata commented on Jun 9, 2021

    @GaborioSensata

    Just wanted to say that I also got the same error message. But as you said it is not affecting the execution of my code.

  5. ggrothendieck commented on Jul 27, 2021

    @ggrothendieck

    A workaround if you don't need type conversion is to add the argument type.convert=FALSE.

  6. gernophil commented on Oct 17, 2023

    @gernophil

    This warning still appears. Will we get a fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions