Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about stringi

Read more about stringi

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - stringi

Dynamically generate subset column names for a dataframe using for loop

For the following dataframe df: df <- structure(list(id = c("M0000607", "M0000609", "M0000612"), `2021-08(actual)` = c(12.6, 19.2, 8.3), `2021-09(actual)` = c(10.3, 1...
test-img

ah bon

r

vector

dplyr

stringi

Votes: 0

Answers: 1

Latest Answer

You can do it in base R like this with a bit of help from the lubridate package. year_months <- c('2021-12', '2021-11', '2021-10') curr <- lubridate::ym(year_months) prev <- curr - months(2...
test-img

ekoam

r remove keywords in a column

I have a column in my dataframe with words like this. ColA 2-4 Model Group1 Group ACH Group2 Phenols Group1 Group ACH Group2 MONO MHPP Group1 Group ACH Group2 I want to create two additional columns ...
test-img

Ahir Bhairav Orai

r

gsub

stringi

string-substitution

Votes: 0

Answers: 3

Latest Answer

Here is another option using tidyverse. First, I create a new column (ColB) using str_remove to remove any of the keywords. Then, I use str_extract_all to pull out only the keywords to create another...
test-img

AndrewGB

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved