Quantcast
Channel: User micstr - Stack Overflow
Browsing index pages (48 articles)
↧

Comment by micstr on Oauth2 for SharePoint 365 REST

Thanks k1m190r - getting that beer now!

View Article


Image may be NSFW.
Clik here to view.

How do you view corrgrapher object in Shiny?

I would like to show a corrgrapher object within Shiny, which allows a user to move the nodes. The package help says "Feel free to pass it into plot, include it in knitr report or generate a simple...

View Article


Answer by micstr for How do you view corrgrapher object in Shiny?

Oops figured it out:if (interactive()) { ui <- fluidPage( fluidRow(h1("corrgrapher plot"), uiOutput("corrgram")) ) server <- function(input, output, session) { output$corrgram <- renderUI({...

View Article

How do I collapse a multi-column data.frame into a single text string...

The goal is to take some plot data and then put the latest points in the caption as a string.My toy data is:df <- data.frame (state=c("buy", "sell"), freq=c(0.102, .801))so it looks like this:>...

View Article

Answer by micstr for How do I collapse a multi-column data.frame into a...

This is my cheesy loop method which I am trying to avoid:my_str <- ""for (row in 1:nrow(df)) { my_str <- paste0(my_str, df[row, "state"], " ", df[row, "freq"]) if (row < nrow(df)) { my_str...

View Article


shinyapps says Python package not installed after just installing it

I am having trouble deploying to shinyapps.io a Shiny app using reticulate and sklearn. It worked in the past which is strange.My showLogs show that the sklearn was installed OK, but then it fails. See...

View Article

Answer by micstr for Run a batch file with Windows task scheduler

For those whose bat files are still not working in Windows 8 and 10+ Task Scheduler , one thing I would like to add to Ghazi's answer - after much suffering:Under Actions, Choose "Create BASIC task",...

View Article

Image may be NSFW.
Clik here to view.

Answer by micstr for Shiny layout - how to add footer disclaimer?

Here is an example for other Shiny happy people to use.Note that I have updated the above example to sidebarLayout as ?pageWithSidebar help states:pageWithSidebar - This function is deprecated. You...

View Article


Answer by micstr for Adding quarters to R date

Old answer but to those arriving here, lubridate has a function %m+%that adds months and preserves monthends.a <- as.Date("2006-01-01")Add future months worth of dates:The original poster wanted 4...

View Article


Answer by micstr for How to incrementally add multiple model outputs to a DF...

Titorelli you probably solved this now, but this might help others in future.I realise answers that just reference links are not great for SO, but I suggest looking at Hadley's R for Data Science book,...

View Article

VBA Saving single sheet as CSV (not whole workbook)

I appreciate there are lots of entries like save individual excel sheets as csvand Export each sheet to a separate csv file - But I want to save a single worksheet in a workbook. My code in my xlsm...

View Article

R + Shiny which hammer? straight Shiny, flexdashboard or shinydashboard?...

At the risk of getting hit with a mods "too broad a question" hammer, I want to ask given the plethora of interactive R Shiny tools and packages emerging, when do you use which one?Shiny - to me only...

View Article

Answer by micstr for shinydashboard some Font Awesome Icons Not Working

For those newcomers in 2021, this icon ... does not exist error is due to the Font Awesome changing names to their icons between 4 and 5 (see background here). Below are solutions that do not require...

View Article


Merge consecutive rows in pandas and leave some rows untouched

I have tried looking at other merge rows in pandas solutions here and here and especially the solution here.I want to combine the individual sentences scraped from bullet points into one paragraph...

View Article

Answer by micstr for Merging two rows of data in R based on rules

An alternative approach using fill. Using tidyverse 1.3.0+ with dplyr 0.8.5+, you can use fill to fill in missing values. See this for more information...

View Article


Image may be NSFW.
Clik here to view.

Answer by micstr for The right way to plot multiple y values as separate...

With reshape2 being deprecated, I updated @kohske answer using pivot_longer from tidyverse package.Pivoting is explained here and involves specifying the data to reshape, second argument describes...

View Article

Why does EMA in TTR package throw an error if data same size? (not enough...

In library(TTR) an exponential moving average with data same size as the n gives an error. But when data length is increased by 1 then it gives two answers?(Example data below I am just throwing in a...

View Article


Answer by micstr for Error in YAML with R Markdown

I took a while to fix this as well. It seems the new knitr needs a version of yaml 2.2.0 and above. This help from @ScientificProgrammer on github here...

View Article

Checking if date is blank in R?

An easy one but I am sure someone knows how to do this...In R, I was looking for something like is.blank to error trap in my function where a User can specify a date or it can be blank and we will...

View Article

Image may be NSFW.
Clik here to view.

R plotly ignoring text label alignment hjust

I am using plotly 4.8 with ggplot2 3.0.0, and trying to add and align text labels to my scatter plots. However, it seems the hjust parameter is being ignored by plotly in geom_text(aes(....), hjust =...

View Article
Browsing index pages (48 articles)


Latest Images