Reputation: 902
I am trying to import a dataset from .csv
file but my file records ?
symbol. How can I avoid the '?'. The market data website.
Sample data:
structure(list(`N2EX Day Ahead Auction Prices in EUR/MWh` = c("UK time",
"23<ff>-<ff>00", "00<ff>-<ff>01", "01<ff>-<ff>02", "02<ff>-<ff>03",
"03<ff>-<ff>04"), X2 = c("CET/CEST time", "00<ff>-<ff>01", "01<ff>-<ff>02",
"02<ff>-<ff>03", "03<ff>-<ff>04", "04<ff>-<ff>05"), X3 = c("06/01/2019",
"62,56", "69,54", "62,51", "59,17", "58,81"), X4 = c("05/01/2019",
"73,38", "65,25", "63,45", "58,86", "57,84"), X5 = c("04/01/2019",
"63,56", "65,48", "65,77", "56,51", "56,42"), X6 = c("03/01/2019",
"61,05", "61,04", "61,06", "60,97", "56,70"), X7 = c("02/01/2019",
"54,37", "57,65", "58,19", "55,39", "53,84"), X8 = c("01/01/2019",
"66,85", "66,99", "62,13", "51,51", "49,14"), X9 = c("31/12/2018",
"57,97", "63,27", "62,07", "56,68", "54,50"), X10 = c("30/12/2018",
"65,16", "67,38", "72,37", "60,97", "58,83")), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
Upvotes: 0
Views: 40
Reputation: 1085
I read your the sample data as "data" and replaced what is producing a ?
as follows:
data$`N2EX Day Ahead Auction Prices in EUR/MWh` <- gsub("<ff>","",data$`N2EX Day Ahead Auction Prices in EUR/MWh`)
data$X2 <- gsub("<ff>","",data$X2)
Upvotes: 1