I want to leverage this R code in powerbi and use the power bi viz to create graphs using the table generated by the R code. I am able to run and view the output for this R code. As per my understanding I should be able to view this table named output_data
on right side of power bi under Data section.
colnames(dataset) <- ("Year", "Count")
dataset$Year <- as.numeric(dataset$Year)
dataset$Count <- as.numeric(dataset$Count)
poly_model <- lm(Count ~ poly(Year, 2, raw = TRUE), data = dataset)
dataset$Predicted <- predict(poly_model, dataset)
output_data <- data.frame(Year = dataset$Year, Count = dataset$Count, Predicted = dataset$Predicted)
output_data
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745090922a4610690.html
评论列表(0条)