Use R language make webpage(shiny R)
当前位置:以往代写 > R语言教程 >Use R language make webpage(shiny R)
2019-06-13

Use R language make webpage(shiny R)

Use R language make webpage(shiny R)

"shiny R language is extremely easy and fun of a packet it does not need to learn about Web language and how to make a Web page or the like can be achieved using R language for building interactive Web applications.It can make us a more convenient and interactive manner and represent the results, data and models, and even inserted pictures, animation, video and sound and the like, may be said to be very cool!

 

Here's a simple and rapid to realize, you can have my own personal version of a webpage.

If you have not installed the "shiny package, by first installing a pathway,

> install. packages ("shiny")

Provisions of the library (shiny)

In the prior, we may first create a separate folder, for example called "shiny

Then by selecting the Web App Multiple File (ui. / R) of the first step.

Next is the key!

App consists of two parts, one part is ui, i. e.User InterfaceThe other part is,Server function.

whereinuifor controlpagethe layout, serverthen theis a function, used to build or rebuild in the ui in a show ofTheLike.nowIn… don't know it was OK to follow meThewill step – by – stepinletrowSpeakJie.

 

First of all,Theto use the ui is mainly applicable to the netpagethe layout of the basic networkpagethe following layoutFIG.:

((

("title panel"),

(

("sidebar panel"),

(the "main panel")

)

))

ui. R with the function to display a self –dynamic tuningSettinggroupdimensions are adapted to the size ofYou should review, from thegroupPlace in the function, to obtain a whole layout of the app.

while and is the most commonly used elements,over –mostsimplethe uiimplementI am,Themay be obtained on theFIG.The layout.

 

After the layout, IThein different part of the added wantedEastWest.As the basic of the followingContent.

h1 ("Header 1"),

h2 ("Header 2"),

h3 ("Header 3"),

h4 ("Header 4"),

h5 ("Header 5"),

h6 ("Header 6"),

(hr),

(br),

p (strong ("bold"),

p (. lamda.em ("italic"),

p – code ("code"),

p ("Click", (span style = "color: blue", "Here"),

(a) (= "www,". com "," Home ")

ThisInside of the tags is" shiny, IThemay be usednames (tags)We have to see what components may be added, to obtain their desired effect, like the one above.

    in addition to the above – mentioned basic components,"shinyIn some very useful controls available to us, it is often used some of the controls.

# ui. R

 

((

(the "basic control"),

 

(

   

(column 3,

h3 (""),

("action", label = "Action"),

(br),

(br),

("Submit"),

   

(column 3,

h3 (""),

("checkbox", label = "A Choice", value = TRUE)),

(column 3,

(","

label = h3 (""),

choices = list ("Choice 1" = 1,

Choice of "2" = 2, "Choice" 3 "= 3),

selected = 1)),

   

(column 3,

("date",

label = h3 (""),

value = "2014 – 01 – 01")

),

 

(

   

(column 3,

("", label = h3 ("Date range"),

   

(column 3,

("file", label = h3 ("File input"),

   

(column 3,

("action",

label = h3 ("ActionLink"),

The icon ("calendar"),

   

(column 3,

(","

label = h3 (""),

value = 1)

 

),

 

    关键字:

在线提交作业