Forum Replies Created
-
AuthorPosts
-
Merav Yuravlivker
KeymasterHi Neal,
Make sure the medicare data set is in your Shiny app folder, otherwise it won’t be able to find it. When Shiny runs, it automatically uses its folder to pull additional files. Let me know if that works!
Thank you for learning with us,
MeravMerav Yuravlivker
KeymasterHi Hannah,
Thanks for your question – when you’re assigning values to targets and sources, you have to start from 0. Go back into your code and rerun it starting from 0. Let me know if that works!
Thank you for learning with us,
MeravMerav Yuravlivker
KeymasterHi Kate,
Thank you for your questions – if you’re not using a provider tile, make sure you put in “addTiles” instead of “addProviderTiles”.
That should take care of that problem!
Thank you for learning with us,
MeravMerav Yuravlivker
KeymasterHi Kirsten,
Thank you for your question – the most likely cause of this issue is that the structure of the data frames are not equal. Make sure that the column you’re joining data frames by is in character structure, not factor.
Also, there may be extraneous spaces that aren’t visible in the data frame. In order to remove all the spaces, use the gsub function in the following code:
gsub(“[[:space:]]”, “”, “dataframe”$”column”)
That should remove any spaces you may have missed and should make the columns uniform.
Thank you for learning with us,
MeravMerav Yuravlivker
KeymasterHi Kristen,
Thank you for your question – there are a few ways to solve this problem. First, you can actually access the log in the Shinyapps.io that will tell you how your application is running. Simply click on the name of the app, and the “Logs” tab will appear.
Click on the “Logs” tab and you can see a record of the logs of operations.
Usually you can find an issue in that log and then you can go back into your Shiny app through RStudio to fix any problems that are occurring.
If you want to delete the app, you have to archive it first and then delete it. Let me know if you have any more questions!
Thank you for learning with us,
MeravMerav Yuravlivker
KeymasterHi Matilda,
Thank you for your question – Shiny applications don’t need to have a working directory, as they operate from their folder. As long as you have all the data sets and other materials that the Shiny app will use, you don’t need to set a directory.
Thank you for learning with us,
MeravMerav Yuravlivker
KeymasterHi Adam,
Thanks for your question. There are several ways for you to download the PDF of the course slides:
1. Download them in the course materials from the main course page.
2. Download the file from the embedded PDF underneath the course videos.
3. Download them from the All Resources page.
The materials are the same, but they’re in multiple locations for you.
Thank you for learning with us,
MeravSeptember 24, 2015 at 9:28 pm EDT in reply to: A function I created isn't working what can I do? #8536Merav Yuravlivker
KeymasterHi Kelly,
When you create a function you should do the following:
1. Make sure you give the function a name
2. Make sure the inputs inside the parentheses of function() match the labels in the function commands
3. Make sure that the { opens the function after the function() command
4. Make sure that the } closes the function on a separate line after you’ve entered all of your commandsHere is an example:
Kelly_function = function(input_1, input_2){
command_1(input_1)
command_2(input_2)
}If the goal of your function is to display something make sure that you end the function with either a command to plot a graph of the print() command to display a result in the console window.
Please post again if you have any more trouble with this and please include the code you’re using so we can give you a concrete suggestion.
Thank you for learning with us!
-Merav
September 24, 2015 at 9:23 pm EDT in reply to: Can you load png, GIF and other picture files into R? #8535Merav Yuravlivker
KeymasterHi Kelly,
Yes, you can read a png file into R with the png package. Please try this code:
install.packages(“png”)
library(png)# Learn about all the functions of the png package
library(help = png)# Learn about the options available when reading png files into R
?readPNG# Load a png file into R
readPNG(“your_file.png”)Please post again if you have any more trouble with this.
Thank you for learning with us!
-Merav
Merav Yuravlivker
KeymasterHi Alex,
Please try the RMySQL package. Please run the following code:
install.packages(“RMySQL”)
library(RMySQL)# Use this command to learn about all the functions in the package
library(help = RMySQL)Please post again if you have any more trouble with this.
Thank you for learning with us!
-Merav
September 24, 2015 at 9:18 pm EDT in reply to: R isn't recognizing a function I'm running, how can I fix that? #8528Merav Yuravlivker
KeymasterHi Alex,
Please make sure that you have the package that includes the function installed and loaded.
Use install.packages(“package name”) to install a package.
Use library(“package name”) to load a package after it’s been installed.Sometimes, several packages have functions with the same name. In those cases, you want to make sure that the last package you load is the one that contains the function that you’re using. Again use the library(“package name”) command to do that.
If you have any more trouble with this please post again with the name of the function that you’re woking with.
Thank you for learning with us!
-Merav
Merav Yuravlivker
KeymasterHi Alex,
Yes, you can! Please look at the help menu of the tm package. Try this code:
install.packages(“tm”)
library(tm)# Learn about the functionality of the tm package
library(help = tm)# Learn about the readPDF function
?readPDFPlease post again if you have any more trouble with this.
Thank you for learning with us!
-Merav
Merav Yuravlivker
KeymasterHi Jeff,
Please make sure that you are using this code:
your_data[order(your_data$column_name, decreasing = FALSE),]Note the comma that comes right before the ], if that comma is missing you will get the error that you’re seeing. Please post again if you have any more problems with this.
Thank you for learning with us!
-Merav
Merav Yuravlivker
KeymasterHi Kelly,
Try this:
First, save your SAS datas in trasport format:
libname out xport ‘c:/mydata.xpt’;
data out.mydata;
set sasuser.mydata;
run;Then, in R use this code:
install.packages(“Hmisc”)
library(Hmisc)
your_data = sasxport.get(“c:/your_data.xpt”)
# Note that character variables will be converted to R factorsYou can also try to use the foreign package:
install.packages(“foreign”)
library(foreign)# Learn about the read.ssd() function
?read.ssdPlease post again if you have trouble with this.
Thank you for learning with us!
-Merav
Merav Yuravlivker
KeymasterHi Barb,
Try the following:
install.packages(“gdata”)
library(gdata)
df = read.xls (“file_name.xlsx”), sheet = 1, header = TRUE)The “sheet” argument tells R which tab to use. The “header” argument tells R to keep column titles. The gdata package may require you to install additional Perl libraries. Perl is usually already installed in Linux and Mac, but sometimes may require additional installation on Windows platforms. Please post again if you still have trouble.
Thank you for learning with us!
-Merav
-
AuthorPosts