Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
dean
Regular Visitor

cannot use custom visual with R.

I already install R 3-2.0 and Rstudio and setting my R Scripting at powerBI but when i use custom visual which need R i get this error, how to solve this problem?

i want to try using custom visual Clustering K means

 

Feedback Type:
Frown (Error)

Timestamp:
2017-07-28T04:02:54.8672061Z

Local Time:
2017-07-28T11:02:54.8672061+07:00

Product Version:
2.48.4792.721 (PBIDesktop) (x64)

Release:
July 2017

IE Version:
11.483.15063.0

OS Version:
Microsoft Windows NT 10.0.15063.0 (x64 en-US)

CLR Version:
4.6.2. or later [Release Number = 460798]

Workbook Package Info:
1* - id-ID, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

Peak Working Set:
449 MB

Private Memory:
324 MB

Peak Virtual Memory:
33.9 GB

Error Message:
R script error.
Loading required package: XML
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'XML'
2: In libraryRequireInstall("XML") :
*** The package: 'XML' was not installed ***
Loading required package: htmlwidgets
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'htmlwidgets'
2: In libraryRequireInstall("htmlwidgets") :
*** The package: 'htmlwidgets' was not installed ***
Loading required package: nloptr
Loading required package: seriation
Loading required package: NbClust
Loading required package: cluster
Loading required package: car
Loading required package: scales
Loading required package: fpc
Loading required package: mclust
Loading required package: apcluster
Loading required package: vegan
Loading required package: Redmonder
Loading required package: ggplot2
Loading required package: plotly
Loading required package: ggplot2
Error: could not find function "ggplot"
Execution halted


User ID:
69cc8715-c05c-40f0-a6c7-2dcc30e3b6df

Session ID:
28a151aa-7f6c-4296-bf40-89ccc9361122

Telemetry Enabled:
True

Model Default Mode:
Import

Snapshot Trace Logs:
C:\Users\User\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot500869229.zip

Performance Trace Logs:
C:\Users\User\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_EnableReportTheme
PBI_numericSlicerEnabled
PBI_SpanishLinguisticsEnabled
PBI_PbiServiceLiveConnect
PBI_daxTemplatesEnabled
CustomConnectors

Disabled DirectQuery Options:
PBI_DirectQuery_Unrestricted

Cloud:
GlobalCloud

Activity ID:
null

Time:
Fri Jul 28 2017 11:02:48 GMT+0700 (SE Asia Standard Time)

Client Error Code:
ServiceErrorToClientError

Error Details:
R script error.
Loading required package: XML
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'XML'
2: In libraryRequireInstall("XML") :
*** The package: 'XML' was not installed ***
Loading required package: htmlwidgets
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'htmlwidgets'
2: In libraryRequireInstall("htmlwidgets") :
*** The package: 'htmlwidgets' was not installed ***
Loading required package: nloptr
Loading required package: seriation
Loading required package: NbClust
Loading required package: cluster
Loading required package: car
Loading required package: scales
Loading required package: fpc
Loading required package: mclust
Loading required package: apcluster
Loading required package: vegan
Loading required package: Redmonder
Loading required package: ggplot2
Loading required package: plotly
Loading required package: ggplot2
Error: could not find function "ggplot"
Execution halted


Stack Trace:
Microsoft.PowerBI.ExploreServiceCommon.ScriptHandlerException: R script error.
Loading required package: XML
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'XML'
2: In libraryRequireInstall("XML") :
*** The package: 'XML' was not installed ***
Loading required package: htmlwidgets
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'htmlwidgets'
2: In libraryRequireInstall("htmlwidgets") :
*** The package: 'htmlwidgets' was not installed ***
Loading required package: nloptr
Loading required package: seriation
Loading required package: NbClust
Loading required package: cluster
Loading required package: car
Loading required package: scales
Loading required package: fpc
Loading required package: mclust
Loading required package: apcluster
Loading required package: vegan
Loading required package: Redmonder
Loading required package: ggplot2
Loading required package: plotly
Loading required package: ggplot2
Error: could not find function "ggplot"
Execution halted
---> Microsoft.PowerBI.Radio.RScriptRuntimeException: R script error.
Loading required package: XML
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'XML'
2: In libraryRequireInstall("XML") :
*** The package: 'XML' was not installed ***
Loading required package: htmlwidgets
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'htmlwidgets'
2: In libraryRequireInstall("htmlwidgets") :
*** The package: 'htmlwidgets' was not installed ***
Loading required package: nloptr
Loading required package: seriation
Loading required package: NbClust
Loading required package: cluster
Loading required package: car
Loading required package: scales
Loading required package: fpc
Loading required package: mclust
Loading required package: apcluster
Loading required package: vegan
Loading required package: Redmonder
Loading required package: ggplot2
Loading required package: plotly
Loading required package: ggplot2
Error: could not find function "ggplot"
Execution halted

at Microsoft.PowerBI.Radio.RScriptWrapper.RunScript(String originalScript, Int32 timeoutMs)
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.RunInternal(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.Run(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDataShapeResult(QueryCommand transformCommand, String dataShapeId, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteDataQuery(IQueryResultDataWriter queryResultDataWriter, DataShapeGenerationContext dsqGenContext, EntityDataModel model, DataQuery query, ServiceErrorStatusCode& serviceErrorStatusCode)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, ExecuteSemanticQueryRequest request, IConceptualSchema conceptualSchema, EntityDataModel model)

DPI Scale:
100%

Supported Services:
Power BI

Formulas:


section Section1;

shared #"2014-2016" = let
Source = Excel.Workbook(File.Contents("D:\Skripsi\TMC Polda Metro Jaya 2014-2016\----DATA FIX CLEAR 2014-2016\DATA KECELAKAAN TWITTER 2014 -2016 FIX -2.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"date", type datetime}, {"retweets", Int64.Type}, {"favorites", Int64.Type}, {"text", type text}, {"waktu", type datetime}, {"Place", type text}, {"City", type text}, {"Jenis Kendaraan", type text}}),
#"Removed Duplicates" = Table.Distinct(#"Changed Type", {"text"})
in
#"Removed Duplicates";

shared #"2014" = let
Source = Excel.Workbook(File.Contents("D:\Skripsi\TMC Polda Metro Jaya 2014-2016\----DATA FIX CLEAR 2014-2016\DATA KECELAKAAN TWITTER 2014 FIX -2.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"date", type datetime}, {"retweets", Int64.Type}, {"favorites", Int64.Type}, {"text", type text}, {"waktu", type datetime}, {"Place", type text}, {"City", type text}, {"Jenis Kendaraan", type text}}),
#"Removed Duplicates" = Table.Distinct(#"Changed Type", {"text"})
in
#"Removed Duplicates";

shared #"2015" = let
Source = Excel.Workbook(File.Contents("D:\Skripsi\TMC Polda Metro Jaya 2014-2016\----DATA FIX CLEAR 2014-2016\DATA KECELAKAAN TWITTER 2015 FIX - 2.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"date", type datetime}, {"retweets", Int64.Type}, {"favorites", Int64.Type}, {"text", type text}, {"waktu", type datetime}, {"Place", type text}, {"City", type text}, {"Jenis Kendaraan", type text}}),
#"Removed Duplicates" = Table.Distinct(#"Changed Type", {"text"})
in
#"Removed Duplicates";

shared #"2016" = let
Source = Excel.Workbook(File.Contents("D:\Skripsi\TMC Polda Metro Jaya 2014-2016\----DATA FIX CLEAR 2014-2016\DATA KECELAKAAN TWITTER 2016 FIX -2.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"date", type datetime}, {"retweets", Int64.Type}, {"favorites", Int64.Type}, {"text", type text}, {"waktu", type datetime}, {"Place", type text}, {"City", type text}, {"Jenis Kendaraan", type text}}),
#"Removed Duplicates" = Table.Distinct(#"Changed Type", {"text"})
in
#"Removed Duplicates"

 

This is the eror screenshot :

eror R.PNG

1 ACCEPTED SOLUTION

Hi @dean,

 

Please update the R version to supported version R 3.3.1, R 3.3.0, MRO 3.3.1, MRO 3.3.0, MRO 3.2.2 then test again.

 

If issue persists, please enable desktop trace log, repeat steps until error occurs, share trace log files with us.

 

Best Regards,

Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

16 REPLIES 16
Anonymous
Not applicable

Error Message:
R script error.
Loading required package: XML
Loading required package: methods
Warning message:
package 'XML' was built under R version 3.3.3
Loading required package: htmlwidgets
Warning message:
package 'htmlwidgets' was built under R version 3.3.3
Loading required package: ggplot2
Error in inDL(x, as.logical(local), as.logical(now), ...) :
  unable to load shared object 'C:/Users/Atulp/Library/rlang/libs/x64/rlang.dll':
  LoadLibrary failure:  The specified procedure could not be found.

bryanmcguire
Regular Visitor

Hi All,

 

 

I too got this error when trying to run a number of imported Analytical Visualisations in Power BI. It turned out to be a permissions issue. As soon as I began to run Power BI desktop in "Windows Administrator Mode" my visualisation began to work as normal.

 

I hope this helps....

 

 

miryalab
New Member

hi, I tried installing the packages shown in the error. However, I am continuously getting the error for the package "htmlwidgets". Is there any special instructions to install this package? I am stuck with this package only. All other packages got installed. Kindly help. 

Thank you,

Bharath

v-qiuyu-msft
Community Support
Community Support

Hi @dean,

 

From this article, Clustering custom visual supports R versions:  R 3.3.1, R 3.3.0, MRO 3.3.1, MRO 3.3.0, MRO 3.2.2. Please try to update the R version to supported version. Also to enable this R powered visual, we need to install R packages: nloptr, seriation, pbkrtest,NbClust, cluster, car, scales, fpc, mclust, apcluster, vegan.

 

Based on my test, download the sample from here can work fine. You can try to run the same R version as ours as well to test it.

 

q3.PNG

 

Best Regards,
QiuyunYu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thanks @v-qiuyu-msft i already try to install package in R:

nloptr, seriation, pbkrtest,NbClust, cluster, car, scales, fpc, mclust, apcluster, vegan

 

but i still get this error? do i still need install some package or change r version?

i think this is the main/only error i attached the picture:

image.png

 

 

 this is the full eror details :

 

 

 

Feedback Type:
Frown (Error)

Timestamp:
2017-08-02T09:06:33.7194602Z

Local Time:
2017-08-02T16:06:33.7194602+07:00

Product Version:
2.48.4792.721 (PBIDesktop) (x64)

Release:
July 2017

IE Version:
11.483.15063.0

OS Version:
Microsoft Windows NT 10.0.15063.0 (x64 en-US)

CLR Version:
4.6.2. or later [Release Number = 460798]

Workbook Package Info:
1* - id-ID, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

Peak Working Set:
378 MB

Private Memory:
270 MB

Peak Virtual Memory:
33.9 GB

Error Message:
R script error.
Loading required package: XML
Loading required package: methods
Loading required package: htmlwidgets
Loading required package: nloptr
Loading required package: seriation
Loading required package: NbClust
Loading required package: cluster
Loading required package: car
Loading required package: scales
Loading required package: fpc
Loading required package: mclust
Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.
Loading required package: apcluster

Attaching package: 'apcluster'

The following object is masked from 'package:stats':

heatmap

Loading required package: vegan
Loading required package: permute

Attaching package: 'permute'

The following object is masked from 'package:seriation':

permute

Loading required package: lattice

Attaching package: 'lattice'

The following object is masked from 'package:seriation':

panel.lines

This is vegan 2.4-3
Loading required package: Redmonder
Loading required package: ggplot2
Loading required package: plotly
Error in redmonder.pal(n, "qPBI") :
could not find function "redmonder.pal"
Calls: myPallete
Execution halted


User ID:
69cc8715-c05c-40f0-a6c7-2dcc30e3b6df

Session ID:
07f2eebe-eb12-4db9-b9e2-e93700315866

Telemetry Enabled:
True

Model Default Mode:
Import

Snapshot Trace Logs:
C:\Users\User\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot585989286.zip

Performance Trace Logs:
C:\Users\User\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_EnableReportTheme
PBI_numericSlicerEnabled
PBI_SpanishLinguisticsEnabled
PBI_PbiServiceLiveConnect
PBI_daxTemplatesEnabled
CustomConnectors

Disabled DirectQuery Options:
PBI_DirectQuery_Unrestricted

Cloud:
GlobalCloud

Activity ID:
null

Time:
Wed Aug 02 2017 16:06:31 GMT+0700 (SE Asia Standard Time)

Client Error Code:
ServiceErrorToClientError

Error Details:
R script error.
Loading required package: XML
Loading required package: methods
Loading required package: htmlwidgets
Loading required package: nloptr
Loading required package: seriation
Loading required package: NbClust
Loading required package: cluster
Loading required package: car
Loading required package: scales
Loading required package: fpc
Loading required package: mclust
Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.
Loading required package: apcluster

Attaching package: 'apcluster'

The following object is masked from 'package:stats':

heatmap

Loading required package: vegan
Loading required package: permute

Attaching package: 'permute'

The following object is masked from 'package:seriation':

permute

Loading required package: lattice

Attaching package: 'lattice'

The following object is masked from 'package:seriation':

panel.lines

This is vegan 2.4-3
Loading required package: Redmonder
Loading required package: ggplot2
Loading required package: plotly
Error in redmonder.pal(n, "qPBI") :
could not find function "redmonder.pal"
Calls: myPallete
Execution halted


Stack Trace:
Microsoft.PowerBI.ExploreServiceCommon.ScriptHandlerException: R script error.
Loading required package: XML
Loading required package: methods
Loading required package: htmlwidgets
Loading required package: nloptr
Loading required package: seriation
Loading required package: NbClust
Loading required package: cluster
Loading required package: car
Loading required package: scales
Loading required package: fpc
Loading required package: mclust
Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.
Loading required package: apcluster

Attaching package: 'apcluster'

The following object is masked from 'package:stats':

heatmap

Loading required package: vegan
Loading required package: permute

Attaching package: 'permute'

The following object is masked from 'package:seriation':

permute

Loading required package: lattice

Attaching package: 'lattice'

The following object is masked from 'package:seriation':

panel.lines

This is vegan 2.4-3
Loading required package: Redmonder
Loading required package: ggplot2
Loading required package: plotly
Error in redmonder.pal(n, "qPBI") :
could not find function "redmonder.pal"
Calls: myPallete
Execution halted
---> Microsoft.PowerBI.Radio.RScriptRuntimeException: R script error.
Loading required package: XML
Loading required package: methods
Loading required package: htmlwidgets
Loading required package: nloptr
Loading required package: seriation
Loading required package: NbClust
Loading required package: cluster
Loading required package: car
Loading required package: scales
Loading required package: fpc
Loading required package: mclust
Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.
Loading required package: apcluster

Attaching package: 'apcluster'

The following object is masked from 'package:stats':

heatmap

Loading required package: vegan
Loading required package: permute

Attaching package: 'permute'

The following object is masked from 'package:seriation':

permute

Loading required package: lattice

Attaching package: 'lattice'

The following object is masked from 'package:seriation':

panel.lines

This is vegan 2.4-3
Loading required package: Redmonder
Loading required package: ggplot2
Loading required package: plotly
Error in redmonder.pal(n, "qPBI") :
could not find function "redmonder.pal"
Calls: myPallete
Execution halted

at Microsoft.PowerBI.Radio.RScriptWrapper.RunScript(String originalScript, Int32 timeoutMs)
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.RunInternal(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.Run(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDataShapeResult(QueryCommand transformCommand, String dataShapeId, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteDataQuery(IQueryResultDataWriter queryResultDataWriter, DataShapeGenerationContext dsqGenContext, EntityDataModel model, DataQuery query, ServiceErrorStatusCode& serviceErrorStatusCode)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, ExecuteSemanticQueryRequest request, IConceptualSchema conceptualSchema, EntityDataModel model)

DPI Scale:
100%

Supported Services:
Power BI

Formulas:


section Section1;

shared Sheet1 = let
Source = Excel.Workbook(File.Contents("D:\Skripsi\TMC Polda Metro Jaya 2014-2016\----DATA FIX CLEAR 2014-2016\DATA KECELAKAAN TWITTER 2014 -2016 FIX -2(untuk k-means).xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"date", type datetime}, {"text", type text}, {"waktu", type datetime}, {"Waktu", type text}, {"City", type text}, {"Jenis Kendaraan", type text}, {"Vektor JK", Int64.Type}, {"Vektor Waktu", Int64.Type}, {"Vektor JBDTBK", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Waktu", "Waktu.1"}}),
#"Removed Duplicates" = Table.Distinct(#"Renamed Columns", {"text"})
in
#"Removed Duplicates";

 

Hi @dean,

 

Please update the R version to supported version R 3.3.1, R 3.3.0, MRO 3.3.1, MRO 3.3.0, MRO 3.2.2 then test again.

 

If issue persists, please enable desktop trace log, repeat steps until error occurs, share trace log files with us.

 

Best Regards,

Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I have the same problem, and I have R version 3.4.3.

 

details:

 

Feedback Type:
Frown (Error)

Timestamp:
2018-02-28T19:58:44.1275015Z

Local Time:
2018-02-28T11:58:44.1275015-08:00

Session ID:
ecac03b8-5f6c-41c6-b718-f952fd5d2555

Release:
February, 2018

Product Version:
2.55.5010.641 (PBIDesktop) (x64)

Error Message:
R script error.
Loading required package: XML
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'XML'
2: In libraryRequireInstall("XML") :
*** The package: 'XML' was not installed ***
Loading required package: htmlwidgets
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'htmlwidgets'
2: In libraryRequireInstall("htmlwidgets") :
*** The package: 'htmlwidgets' was not installed ***
Loading required package: DT
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'DT'
2: In libraryRequireInstall("DT") :
*** The package: 'DT' was not installed ***
Error in datatable(Values, class = "cell-border compact stripe hover", :
could not find function "datatable"
Execution halted


OS Version:
Microsoft Windows NT 6.1.7601 Service Pack 1 (x64 en-US)

CLR Version:
4.6.1 or later [Release Number = 394271]

Peak Virtual Memory:
4.06 GB

Private Memory:
361 MB

Peak Working Set:
460 MB

IE Version:
11.0.9600.18920

User ID:
64fa99cc-aa2e-4634-a742-accdc87a11a6

Workbook Package Info:
1* - en-US, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

Telemetry Enabled:
True

Model Default Mode:
Import

Snapshot Trace Logs:
C:\Users\duncan.fairweather\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot471184532.zip

Performance Trace Logs:
C:\Users\duncan.fairweather\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Enabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_EnableReportTheme
PBI_numericSlicerEnabled
CustomConnectors
PBI_reportBookmarks
PBI_qnaExplore
PBI_variationUIChange
PBI_customVisualsGallery
PBI_HanaV2

Disabled Preview Features:
PBI_SpanishLinguisticsEnabled
PBI_AdobeAnalytics

Disabled DirectQuery Options:
PBI_DirectQuery_Unrestricted
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

Activity ID:
null

Time:
Wed Feb 28 2018 11:57:38 GMT-0800 (Pacific Standard Time)

Client Error Code:
ServiceErrorToClientError

Error Details:
R script error.
Loading required package: XML
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'XML'
2: In libraryRequireInstall("XML") :
*** The package: 'XML' was not installed ***
Loading required package: htmlwidgets
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'htmlwidgets'
2: In libraryRequireInstall("htmlwidgets") :
*** The package: 'htmlwidgets' was not installed ***
Loading required package: DT
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'DT'
2: In libraryRequireInstall("DT") :
*** The package: 'DT' was not installed ***
Error in datatable(Values, class = "cell-border compact stripe hover", :
could not find function "datatable"
Execution halted


Stack Trace:
Microsoft.PowerBI.ExploreServiceCommon.ScriptHandlerException: R script error.
Loading required package: XML
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'XML'
2: In libraryRequireInstall("XML") :
*** The package: 'XML' was not installed ***
Loading required package: htmlwidgets
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'htmlwidgets'
2: In libraryRequireInstall("htmlwidgets") :
*** The package: 'htmlwidgets' was not installed ***
Loading required package: DT
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'DT'
2: In libraryRequireInstall("DT") :
*** The package: 'DT' was not installed ***
Error in datatable(Values, class = "cell-border compact stripe hover", :
could not find function "datatable"
Execution halted
---> Microsoft.PowerBI.Radio.RScriptRuntimeException: R script error.
Loading required package: XML
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'XML'
2: In libraryRequireInstall("XML") :
*** The package: 'XML' was not installed ***
Loading required package: htmlwidgets
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'htmlwidgets'
2: In libraryRequireInstall("htmlwidgets") :
*** The package: 'htmlwidgets' was not installed ***
Loading required package: DT
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'DT'
2: In libraryRequireInstall("DT") :
*** The package: 'DT' was not installed ***
Error in datatable(Values, class = "cell-border compact stripe hover", :
could not find function "datatable"
Execution halted

at Microsoft.PowerBI.Radio.RScriptWrapper.RunScript(String originalScript, Int32 timeoutMs)
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.RunInternal(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.Run(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDataShapeResult(QueryCommand transformCommand, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ExecuteDataQuery(IQueryResultDataWriter queryResultDataWriter, EntityDataModel model, IConceptualSchema schema, DataQuery query, Int32 queryId, ServiceErrorStatusCode& serviceErrorStatusCode)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, ExecuteSemanticQueryRequest request, IConceptualSchema conceptualSchema, EntityDataModel model)

DPI Scale:
100%

Supported Services:
Power BI

Formulas:


section Section1;

shared Inventory_Target_Tool = let
Source = Sql.Database("uswhl-sql16dev1", "tdxit_reports"),
dbo_Inventory_Target_Tool = Source{[Schema="dbo",Item="Inventory_Target_Tool"]}[Data]
in
dbo_Inventory_Target_Tool;

I figured this out with some google searches.

 

Navigate to the bin folder within the directory where R has been installed and click R.exe

 

type install.packages("XXXX") and click enter

 

(where XXXX is the name of the package that the error messages show as missing)

 

Repeat until all the packages listed in the error have been installed.

<type install.packages("XXXX") and click enter>

 

 

It has done the job. Thnx!

hi, 

 

I have done the same thing to install the packages. But still I am getting the same error with htmlwidgets package. All other packages seems to be installed except this one. Is there any special guidelines that I need to follow to get rid of this error? Kindly help me on this. 

 

Thank you,

Bharath

Open r and run the following line to see if you have successfully installed all the packeages you need.

 

installed.packages(lib.loc = NULL, priority = NULL, noCache = FALSE, fields = NULL, subarch = .Platform$r_arch)

I am getting the same error as the ones before. What do you mean by 

"Navigate to the bin folder within the directory where R has been installed and click R.exe

 

type install.packages("XXXX") and click enter"

 

I can not find R.exe in my directory.

Once you install R, you should have R.exe on your machine.

 

For me, the directory is C:\Program Files\Microsoft\R Open\R-3.4.3\bin

 

When you click R.exe the R window opens and you have a window where you can type commands like powershell.

 

Type

 

install.packages("XXXX")

 

 

where XXXX is the name of the missing module and click enter.

 

 

Thank you for this. However, I just downloaded R and tried to follow this solution--I got this in R:

 

Warning message:
package 'ggplot' is not available (for R version 3.4.4).

 

This is the package needed to run the Outlier Detection plot that Microsoft JUST released in March... why would this package not be available in the most recent version of R?

An update--I installed a past version of R, 3.4.1, the version the outlier that the detecting visualization says it is compabible with. Still no dice--it says there's no "ggplot" in that version either! 

Thank you! That was very helpful! 🙂

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors