Hello-World
Here is a Hello-World Example for creating ternary diagrams in ggtern. Almost identical to building a ggplot2 object.
1 2 3 4 5 6 7 |
library(ggtern) # Based of random data. DATA <- data.frame(A = runif(100), B = runif(100), C = runif(100)) plot <- ggtern(data = DATA, mapping = aes(x = A, y = B, z = C)) + geom_point() plot |





Comments
After running this example, I’m getting this as an error:
Error in find_global(scale_name, env, mode = “function”) :
unused argument (mode = “function”)
Is there something wrong with the ggtern package?
Works fine on my computer. Which version and OS are you running?
For anyone facing the above problem, upgrading to ggtern_1.0.3.2 and ggplot2_1.0.0 fixes this issue…
I copied-pasted the Hello-World code in RStudio (Version 0.99.892) using ggplot2 2.1.0 and ggtern 2.0.1, but I get this error message
Error in FUN(X[[i]], …) : attempt to apply non-function
Can you help me understanding what’s wrong?
giorgio
Giorgio, I am aware of this error, which has happened since ggplot2 2.1.0, I’m in the process of completing an update. The only workaround right now is to roll-back to ggplot2 2.0. Appologies for any inconvenience.
These errors have been fixed in the most recent version, ggtern 2.1.0
With ggplot2 2.1.0 and ggtern 2.1.0 this Hello-World example is now working again (R 3.2.1, Ubuntu 14.04).
Hi. I’ve just updated all my packages and am still getting the error. Error in FUN(X[[3L]], …) : attempt to apply non-function. Must I revert back to the old ggplot2, or has the issue been solved? I’m not sure why I’m having problems now when I could run this earlier.
Hello I fancy I’ve met you before? My contact info in my bio
[img]http://picrure.downloadt.top/img_1/im-yours_30.jpg[/img]
dafnipekovich15@gmail.com
hOur company provides safe non prescription products. Look at our health contributing website in case you want to look healthier. Our company offers a wide variety of non prescription drugs. Take a look at our health site in case you want to feel better with a help generic supplements. Our company offers weight loss products. Look at our health contributing portal in case you want to feel healthier. Our company offers herbal health and related products. Look at our health contributing website in case you want to look better. Our company offers a wide variety of non prescription products. Take a look at our health portal in case you want to to feel healthier with a help of general health products. Our company offers a wide variety of weight loss products. Visit our health contributing website in case you want to look better.
Our site offers a wide variety of non prescription drugs. Visit our health website in case you want to look healthier with a help health products. Our company offers a wide variety of non prescription products. Visit our health website in case you want to feel better with a help generic supplements. Our company provides a wide variety of non prescription products. Take a look at our health site in case you want to look healthier with a help health products. Our company offers herbal non prescription products. Take a look at our health contributing site in case you want to strengthen your health. Our company offers a wide variety of weight loss products. Look at our health contributing website in case you want to feel better.