Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Azure by (5.8k points)

I have seen on various examples (even in Azure ML) that you are able to create appealing charts using R in Visual Studio (not R Studio!), but I have no clue how they did it. I am experienced with R, but if someone could point me in the right direction of how to visualize data sets in Visual Studio and Azure ML; I would really appreciate it. Here is an example I would like to duplicate (in both Azure ML and Visual Studio): Visual studio chart

Image source: ?x=648&y=348&crop=1

1 Answer

0 votes
by (9.6k points)

The easiest way is to use Azure ML studio. Here is the R script:

// Map 1-based optional input ports to variables

dataset1 <- maml.mapInputPort(1) # class: data.frame

library(ggplot2)

library(data.table)

names(dataset1) <- sub(pattern=',', replacement='.', x=names(dataset1))

// This time we need to specify the X to be sex; which we didn’t need in Visual Studio

foo = qplot(x=sex, data=dataset1, geom="histogram", fill=income, position="dodge");

print(foo)

foo = qplot(x=relationship, data=dataset1, geom="histogram", fill=income, position="dodge");

print(foo)

foo = qplot(x=age, data=dataset1, geom="density", alpha=0.5, fill=income);

print(foo)

Connect the sample data to Execute R script and run the experiment. 

Browse Categories

...