powerbi - R in Power BI: Error in plot.window(...) : need finite 'xlim' values -
using r visualization in power bi
error:
stack trace: microsoft.powerbi.exploreservicecommon.scripthandlerexception: r script error. error in plot.window(...) : need finite 'xlim' values calls: plot -> plot.default -> localwindow -> plot.window in addition: warning messages: 1: in min(x) : no non-missing arguments min; returning inf 2: in max(x) : no non-missing arguments max; returning -inf 3: in min(x) : no non-missing arguments min; returning inf 4: in max(x) : no non-missing arguments max; returning -inf execution halted ---> microsoft.powerbi.radio.rscriptruntimeexception: r script error. error in plot.window(...) : need finite 'xlim' values calls: plot -> plot.default -> localwindow -> plot.window in addition: warning messages: 1: in min(x) : no non-missing arguments min; returning inf 2: in max(x) : no non-missing arguments max; returning -inf 3: in min(x) : no non-missing arguments min; returning inf 4: in max(x) : no non-missing arguments max; returning -inf execution halted
i'm getting above error when try subset data.
from reading other similar questions have checked data types , integer , double respectively.
i have checked na values in data using any(is.na(dataset))
, showed there no na values.
when put in xlim
, ylim
values, plot becomes blank.
code:
dataset <- dataset[dataset$column1=="t1",] #subset of data want. rows column1 equal t1. x <- as.numeric(dataset$`height`) # integer y <- as.numeric(dataset$`pct pop`) # double plot(x, y, xlim = c(0, 45000), ylim = c(0, 1.5) )
i fixed error adding filter wanted using power bi filtering method instead of trying create subset of data in r. accomplish this, click on chart , @ bottom right see section called "filters" can add columns , constraints.
Comments
Post a Comment