I'm new in R.
Trying to use the rtriangle function.
swimmerToTornado <- trajectory("to tornado")%>%
log_("Going down TORNADO") %>%
addService(sname = "Tornado", timeDist = function() rtriangle( min = 0.1, max = 0.5, mode = 0.5) )
But I get this Error -
Error in rtriangle(1, min = 0.1, max = 0.5, mode = 0.5) :
unused arguments (min = 0.1, max = 0.5, mode = 0.5)
I tried to remove the 1 argument - still the same error.
I found the answer.
swimmerToTornado <- trajectory("to tornado")%>%
log_("Going down TORNADO") %>%
addService(sname = "Tornado", timeDist = function() rtriangle( 1,0.1, 0.5, 0.5))
Or just like the comment above by @jogo, doing a=
, b=
, c=
will work too.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.