Skip to content

Conversation

@poojachandra
Copy link

No description provided.

@poojachandra poojachandra requested a review from gavinha December 9, 2025 23:36
@poojachandra poojachandra self-assigned this Dec 9, 2025
)

# Function to parse character vectors
parse_numeric_vector <- function(str_value) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has the same problems as the previous PR. The right fix is to use proper parameters in the functions and tell users (as in code users, not actual users) to adapt to those. Blind string parsing will break eventually and is in general very brittle.

}
# Remove "c(" and ")" if present
str_value <- gsub("^c\\(", "", str_value)
str_value <- gsub("\\)$", "", str_value)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the string is not properly formatted? This is an example of what I wrote above, invalid input will create just more errors.

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

Successfully merging this pull request may close these issues.

3 participants