Hi there,
I am very new to R and having trouble combining 4 txt files into one dataframe. This is the code I am using
df2012 <- read.table(file = "/Users/u8008006/Documents/R training/Master_R_for_data_science/Environmental_Data_Deep_Moor_2012.txt", header = TRUE)
df2013 <- read.table(file = "/Users/u8008006/Documents/R training/Master_R_for_data_science/Environmental_Data_Deep_Moor_2013.txt", header = TRUE)
df2014 <- read.table(file = "/Users/u8008006/Documents/R training/Master_R_for_data_science/Environmental_Data_Deep_Moor_2014.txt", header = TRUE)
df2015 <- read.table(file = "/Users/u8008006/Documents/R training/Master_R_for_data_science/Environmental_Data_Deep_Moor_2015.txt", header = TRUE)
data1 = merge(df2012, df2013)
data1 = merge(data1, df2014)
data1 = merge(data1, df2015)
Once I start the merging process I can see in the Global Environment that data1 contains the 9 variables by 0 observations, when it should contain 14,000. What am I missing or doing wrong?
Thank you for your help!