R visual filter inside Power BI

nando88

Board Regular
Joined
Jun 22, 2013
Messages
124
I want to filter data inside the R script in the R visual, so I can make and display calculations such as covariance and others based on the years the data was collected.
I tried this:
Code:
library(plyr)
filter2015<-dataset$yr==2015
filter2016<-dataset$yr==2016
filter2017<-dataset$yr==2017
filter2018<-dataset$yr==2018
d2015<-dataset[filter2015,]
d2016<-dataset[filter2016,]
d2017<-dataset[filter2017,]
d2018<-dataset[filter2018,]
min2015<-min(d2015)
min2016<-min(d2016)
min2017<-min(d2017)
min2018<-min(d2018)
min2<-data.frame(min2015,min2016,min2017,min2018)
plot(min2$yr,min2$valor,col=min2yr,pch=c(16,17,18),xlab="año",ylab="valor")
and I am getting the following error

-- removed inline image ---
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top