Hi User-MV. Yes, as.data.frame( ) converts a tibble into a dataframe. You can confirm this by running str( ) on the new converted dataframe object. I hope this helps!
Hello! Please see the following R code. Where I defined a special function that reads the CSV elements and retrieves the source name using the gsub function (statisticsglobe.com/sub-gsub-r-function-example) and then creates a source_name column using the mutate function (statisticsglobe.com/r-mutate-transmute-functions-dplyr-package). library("dplyr") library("plyr") library("readr") # Function to read each CSV file and add a source column read_csv_with_source
Another amazing to the point video !! Easy to follow, logical and very helpful!
What a great and motivating comment! Thank you very much for your support!
This helped me with a project. Thank you!
Thanks a lot for your feedback. Glad it helped! 🙂
Thx, this help me so much, greetings from Colombia
That's great to hear, thank you so much for the positive feedback, Daniel! Greetings back from Germany
Thanks so much, this is very helpful. What does this row of code do? --> data_all_df <- as.data.frame(data_all) # Convert tibble to data.frame
Hi User-MV. Yes, as.data.frame( ) converts a tibble into a dataframe. You can confirm this by running str( ) on the new converted dataframe object. I hope this helps!
how to add new column in combined data describing the each DataName where do those data belong?
Hello!
Please see the following R code. Where I defined a special function that reads the CSV elements and retrieves the source name using the gsub function (statisticsglobe.com/sub-gsub-r-function-example) and then creates a source_name column using the mutate function (statisticsglobe.com/r-mutate-transmute-functions-dplyr-package).
library("dplyr")
library("plyr")
library("readr")
# Function to read each CSV file and add a source column
read_csv_with_source
Thanks. Could you also show how to merge multiple .txt files excluding headers and get the resultant output in .txt?
Hello Vishakha,
Would you like to implement something like this?
data1