# Load required package
library(jsonlite)
# Define the function
createData <- function(json_string) {
# Trim any extra whitespace
json_string <- trimws(json_string)
# Parse the JSON string into an R list
parsed_data <- jsonlite::fromJSON(json_string)
# Convert the list to a data frame
dataset <- as.data.frame(parsed_data)
# Return the data frame
return(dataset)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.