• Register
0 votes
2.2k views

Problem :

Currently I am trying to create a heatmap using a ggmosaic, But I keep facing below error 

Error in is.finite(x) : default method not implemented for type 'list'”

My Configuration is Windows, RStudio, R version mostly one before a most recent, and ggmosaic Ver 0.1.2

How can I fix the above error?

8 4 2
2,300 points

1 Answer

0 votes

Solution :

I was having the similar configuration as you are having now and I had also faced this kind of issue in the past.

If you just try to update the ggplot2 library as shown below

devtools::install_github('cran/ggplot2')

Then it will solve your problem.

While I was working with mongodb, ggplot and Rshiny I was facing the same error and As the workaround I just converted all NULL value in my dataframe as NA

#For the mongodb aggregation try below approach
out <- dbAggregate(con, "Documenti", list)

#For the conversion from JSON to nested lists try below approach
out2 <- lapply(out, fromJSON, simplifyDataFrame = TRUE)

# For the conversion to dataframe try below approach
dd <- do.call(rbind,out2)

# For the Conversion null value to NA try below approach
dd[sapply(dd, is.null)] <- NA

I hope the above solution will help you in resolving your error and it will help you in achieving your goal.

5 2 1
4,980 points

Related questions

0 votes
1 answer 1.1K views
1.1K views
Problem : I am getting bellow error message error in grid.call.graphics(c_setviewport, vp, true) : non-finite location and/or size for viewport
asked Nov 7, 2019 peterlaw 6.9k points
0 votes
1 answer 399 views
399 views
Problem : I am getting error while using ggplot2 to plot the graphs error in usemethod("depth") : no applicable method for 'depth' applied to an object of class "null"
asked Nov 7, 2019 peterlaw 6.9k points
0 votes
1 answer 953 views
953 views
Problem : When ever i use the predict glmnet function i get the below mentioned error error in cbind2(1, newx) %*% nbeta : not-yet-implemented method for <data.frame> %*% <dgcmatrix>
asked Nov 12, 2019 peterlaw 6.9k points