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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors