lundi 9 novembre 2020

How to create new column if previous column value is Datetime using R programming

How to check if a column has a DateTime value(some rows are strings) and if so, it should display the next row as a separate column using R programming

     **Column1**
30/2/2020 21:03:34
please check the date
30/2/2020 21:05:11
Data is safe
Database error


**Expected Output**

     **Column 1**                   **Column 2**
30/2/2020 21:03:34             please check the date
please check the date                    NA  
30/2/2020 21:05:11                  Data is safe
Data is safe                             NA    
Database error                           NA

Aucun commentaire:

Enregistrer un commentaire