Posts

Showing posts from December 19, 2018

shinydashboard cannot automatically adjust width after include rmarkdown

Image
up vote 0 down vote favorite I am trying to integrate Rmarkdown text and shinydashboard to create a website. However, after I include a Rmarkdown file in the Shiny app, the width of the website cannot automatically adjust to the size of the window. A reproducible example is listed as below. The exampleMD.rmd is just the simple Rmarkdown template. body <- dashboardBody( fluidRow( column(width = 5, box("Box content", width = NULL)), column(width = 7, uiOutput('markdown')) ) ) ui <- dashboardPage( dashboardHeader(title = "Include Rmarkdown"), dashboardSidebar(), body ) server <- function(input, output) output$markdown <- renderUI( HTML(markdown::markdownToHTML(knit('exampleMD.rmd', quiet = TRUE))) ) shinyApp(ui = ui, server = server) The resulting dashboard looks fine, but however I change the size of the window, the width of the dashboard is fixed and cannot automatically adjust according to the width of browser. I w

Mats Lilienberg

Image
Mats Lilienberg (* 22. Dezember 1969 in Vollsjö) ist ein ehemaliger schwedischer Fußballspieler. Laufbahn | Lilienberg debütierte 1990 für Trelleborgs FF. 1993 wurde er Torschützenkönig der Allsvenskan. Im Winter wechselte er zum TSV 1860 München in die 2. Bundesliga. In 13 Spielen gelangen ihm drei Tore. In der folgenden Saison kam er zu sechs Bundesliga-Einsätzen. Beim 1:1-Unentschieden gegen Bayer Uerdingen erzielte er sein einziges Erstligator in Deutschland. Im Winter kehrte er nach Schweden zurück und spielte anderthalb Jahre für den IFK Göteborg. Mit dem Verein wurde er zweimal Meister. In der Champions League Spielzeit 94/95 spielte er für den Klub im Viertelfinale gegen den FC Bayern München. Nach dem 0:0-Unentschieden in München schied der Klub trotz eines Tores von Lilienberg nach 2:0-Führung beim 2:2 im Rückspiel wegen der Auswärtstorregel aus. Zur Spielzeit 1997 wechselte er zu Halmstads BK. Er wurde mit 14 Toren zum zweiten Mal in seiner Laufbahn Torschützenkönig in Sch

Extracting specific page links from a <a href tag using BeautifulSoup

Image
up vote 1 down vote favorite I am using BeautifulSoup to extract all the links from this page: http://kern.humdrum.org/search?s=t&keyword=Haydn I am getting all these links this way: # -*- coding: utf-8 -*- from urllib.request import urlopen as uReq from bs4 import BeautifulSoup as soup my_url = 'http://kern.humdrum.org/search?s=t&keyword=Haydn' #opening up connecting, grabbing the page uClient = uReq(my_url) # put all the content in a variable page_html = uClient.read() #close the internet connection uClient.close() #It does my HTML parser page_soup = soup(page_html, "html.parser") # Grab all of the links containers = page_soup.findAll('a', href=True) #print(type(containers)) for container in containers: link = container #start_index = link.index('href="') print(link) print("---") #print(start_index) part of my output is: Notice that it is returning several links but I really want all the ones with >Someting.