The call to datasetInput1 and datasetInput2 in the two last lines is the reason of the error.
You should instead call datasetInput1() and datasetInput2(). Otherwise R tries to convert the function to char. It should be:
#Debug print value of sting being passed output$testvar = renderText(print(datasetInput1())) # Plot output$myplot = renderPlot({myplotfunct(iris, datasetInput1(), datasetInput2())})
The ()
allows you to get the value of the reactive element rather than interact with the reactive element itself. This is a pretty fundamental concept with Shiny and if that’s not something you are yet familiar yet, perhaps revisit the shiny tutotial
Just by adding the (), the error disappears as you can see below:
Related Posts:
- R Hex to RGB converter
- How do I select the first row in an R data frame that meets certain criteria?
- Poker hand range chart visualization in R
- Error in plot.new() : figure margins too large, Scatter plot
- Error in
: object of type ‘closure’ is not subsettable - How to join (merge) data frames (inner, outer, left, right)
- Interpreting “condition has length > 1” warning from `if` function
- rbind error: “names do not match previous names”
- rbind error: “names do not match previous names”
- $ operator is invalid for atomic vectors for dataframe R
- adding x and y axis labels in ggplot2
- Set NA to 0 in R
- Why use as.factor() instead of just factor()
- Update R using RStudio
- mean() warning: argument is not numeric or logical: returning NA
- ‘x’ and ‘y’ lengths differ ERROR when plotting
- What does “Error: object ‘
‘ not found” mean? - mean() warning: argument is not numeric or logical: returning NA
- Difference between paste() and paste0()
- How do I delete rows in a data frame?
- Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : Polygon edge not found
- Drop data frame columns by name
- How to find the statistical mode?
- How can two strings be concatenated?
- Error in colMeans(x, na.rm = TRUE) : ‘x’ must be numeric in KNN classification
- Error in ggplot.data.frame : Mapping should be created with aes or aes_string
- Remove a row from a data table in R
- Editing legend (text) labels in ggplot
- case_when in mutate pipe
- “Error: Continuous value supplied to discrete scale” in default data set example mtcars and ggplot2
- Logistic Regression on factor: Error in eval(family$initialize) : y values must be 0 <= y <= 1
- Error: Incorrect number of dimensions in R
- dim(X) must have a positive length when applying function in data frame
- Error: attempt to use zero-length variable name
- How to debug “contrasts can be applied only to factors with 2 or more levels” error?
- R error: cannot coerce type ‘closure’ to vector of type ‘double’
- Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, …) : NA/NaN/Inf in ‘y’, tried every possible way
- R t-test Grouping factor must have exactly 2 levels error
- Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, …) 0 non-na cases
- Understanding the order() function
- How to save a data frame as CSV to a user selected location using tcltk
- Error in lis[[i]] : attempt to select less than one element
- Plot a line graph, error in xy.coords(x, y, xlabel, ylabel, log) : ‘x’ and ‘y’ lengths differ
- How to compute weighted mean in R?
- Calculate correlation for more than two variables?
- How to count the number of observations in R like Stata command count
- Remove all of x axis labels in ggplot
- Sum rows in data.frame or matrix
- Create an empty data.frame
- Can’t draw Histogram, ‘x’ must be numeric
- MLE error in R: initial value in ‘vmmin’ is not finite
- Rename multiple columns by names
- What is the difference between rm() and rm(list=ls())?
- Remove rows with all or some NAs (missing values) in data.frame
- Subscript out of bounds – general definition and solution?
- Convert date-time string to class Date
- How do you create vectors with specific intervals in R?
- Linear model function lm() error: NA/NaN/Inf in foreign function call (arg 1)
- Reshaping data.frame from wide to long format
- Remove rows with all or some NAs (missing values) in data.frame
- Converting data frame column from character to numeric
- How to set limits for axes in ggplot2 R plots?
- duplicate ‘row.names’ are not allowed error
- Singularity in backsolve at level 0, block 1 in LME model
- Nested ifelse statement
- How do I get RSS from a linear model output
- Warning message: In `…` : invalid factor level, NA generated
- Plot two graphs in same plot in R
- Mean of a column in a data frame, given the column’s name
- How to overcome error:”attempt to set ‘colnames’ on an object with less than two dimension” in xts object
- remove all variables except functions
- Error: Invalid input: date_trans works with objects of class Date only
- Matrix expression causes error “requires numeric/complex matrix/vector arguments”?
- ‘height’ must be a vector or a matrix. barplot error
- NAs are not allowed in subscripted assignments
- install.packages fails in knitr document: “trying to use CRAN without setting a mirror”
- How to convert a data frame column to numeric type?
- ggplot2, facet_grid, free scales?
- How do I install an R package from source?
- How can I convert Json to data frame in R
- Optimization of a function in R ( L-BFGS-B needs finite values of ‘fn’)
- lmer error: grouping factor must be < number of observations
- R Error (from NA’s to 0): duplicate subscripts for column in Data Frame
- Error in rbind(deparse.level, …) : numbers of columns of arguments do not match R
- R apply function with multiple parameters
- Error in eval(predvars, data, env) : invalid ‘envir’ argument of type ‘character’
- run a for loop in parallel in R
- Error: Invalid number of ‘breaks’ in R
- Efficiently sum across multiple columns in R
- IF “OR” multiple conditions
- Convert the values in a column into row names in an existing data frame
- Replace all 0 values to NA
- Merge error : negative length vectors are not allowed
- non-numeric argument to binary operator
- Column standard deviation R [duplicate]
- Meaning of objects being masked by the global environment
- Subset and ggplot2
- invalid (do_set) left-hand side to assignment in R
- How do I print a hexadecimal number with leading 0 to have width 2 using sprintf?
- In R, dealing with Error: ggplot2 doesn’t know how to deal with data of class numeric