Here is my code :
dfNbMatchSurface = data.frame()
print(dfNbMatchSurface)
dfNbMatchSurface$test <- "exp"
write.csv(dfNbMatchSurface, file = "NbMatchSurface.csv")
And i want to create an empty dataframe with a new test column that is empty and call "exp"
How to do that ?
I've also tried this :
dfNbMatchSurface = data.frame()
print(dfNbMatchSurface)
dfNbMatchSurface$test <- NA
write.csv(dfNbMatchSurface, file = "NbMatchSurface.csv")
I have thos error :
Error in `$<-.data.frame`(`*tmp*`, test, value = "exp") :
replacement has 1 row, data has 0
Regards and thanks