[R] encountered errors while installing additional packages

2019-07-12 Thread gvsa123
Hi there. I need help trying to figure out why R won't see the additional packages I installed while working on text (e.g. tm, stringr, wordcloud) I know I got some errors along the way, and tried solutions to direct R to my local directory but to no avail... I'm not sure what kind of output

Re: [R] hist{graphics}

2019-07-12 Thread Steven
Never mind. Thanks. I found that adding parameter right=F to the call fixes it. On 2019/7/12 下午 05:10, Steven wrote: # Can someone help with this simple frequency histogram problem (n = 15)? # I use four class limits: [90,95], [95,100], [100,105], [105,110]. # These coincide with the limits obt

[R] hist{graphics}

2019-07-12 Thread Steven
# Can someone help with this simple frequency histogram problem (n = 15)? # I use four class limits: [90,95], [95,100], [100,105], [105,110]. # These coincide with the limits obtain by pretty {base}. # Proper frequencies would be: (1,5,6,3). # But hist{graphics} gives me a histogram showing freque

[R] hist{graphics}

2019-07-12 Thread Steven T. Yen
# Can someone help with this simple frequency histogram problem (n = 15)? # I use four class limits: [90,95], [95,100], [100,105], [105,110]. # These coincide with the limits obtain by pretty {base}. # Proper frequencies would be: (1,5,6,3). # But hist{graphics} gives me a histogram showing freque

Re: [R] random truncation

2019-07-12 Thread Rolf Turner
On 13/07/19 3:31 PM, Abby Spurdle wrote: > The distribution of the randomly truncated variable has thus four > parameters: a, b, mu and sigma.  I was able to write down the likelihood > and attempted to maximise it I read the Wikipedia article more carefully. The formula is relatively simp

Re: [R] random truncation

2019-07-12 Thread Abby Spurdle
> The distribution of the randomly truncated variable has thus four > parameters: a, b, mu and sigma. I was able to write down the likelihood > and attempted to maximise it I read the Wikipedia article more carefully. The formula is relatively simple, and is based on the application of Bayes Theo

Re: [R] random truncation

2019-07-12 Thread Rolf Turner
On 13/07/19 10:54 AM, Spencer Graves wrote: Hello:   What do you suggest I do about modeling random truncation? Good question! Probably the best answer is "Give up and go to the pub!" :-) But seriously, there is a package DTDA on CRAN which purports to analyse randomly truncated da

Re: [R] random truncation

2019-07-12 Thread Bert Gunter
Did you search on e.g. "model truncation" at rseek.org? Several packages came up that appear to deal with truncated data, though I have no clue whether in the way you specify. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it."

Re: [R] random truncation

2019-07-12 Thread Abby Spurdle
> It would be nice if I had an R > package that would make it relatively easy to model the truncation as a > function of "d" I suspect that R has everything you need, already. However, I suspect you may need to reformulate your question to find what you need. > I assume that the probability of ob

[R] random truncation

2019-07-12 Thread Spencer Graves
Hello:   What do you suggest I do about modeling random truncation?    I have data on a variable Y in strata S[0], S[1], ..., S[n], where Y is always observed in S[0] but is less often observed in the other strata.  I assume that the probability of observing Y is a monotonically inc

Re: [R] Plotting in R

2019-07-12 Thread Jim Lemon
Oh, sorry, I think I see what you have tried to do. You want yearly ticks but month-day labels. These won't mean much unless you also have the year. If you ask for a date with just the year, as.Date will give you a date in the middle of that year: as.Date("2002","%Y") [1] "2002-07-13" So making t

Re: [R] Plotting in R

2019-07-12 Thread Jim Lemon
Hi Steven, year1 is a number (e.g. 1993), monthday (e.g. 05-01) is not. Jim On Fri, Jul 12, 2019 at 10:56 PM wrote: > > Thanks Jim. > > I am trying to apply this to my version with plot_ly, and couldn't make it to > work. > The sydf$year1 field is numeric, so the min() and max() works, but when

Re: [R] need help in if else condition

2019-07-12 Thread Richard O'Keefe
"ifelse is very slow"? Benchmark time. > x <- runif(100) > y <- runif(100) > system.time(ifelse(x < y, x, y)) user system elapsed 0.403 0.044 0.448 > system.time(y + (x < y)*(x - y)) user system elapsed 0.026 0.012 0.038 This appears to be a quality-of-implementation b

Re: [R] Plotting in R

2019-07-12 Thread nstefi
Thanks Jim. I am trying to apply this to my version with plot_ly, and couldn't make it to work. The sydf$year1 field is numeric, so the min() and max() works, but when I tried to use your formula for the sydf$monthday field I get an error: yrticks <- as.Date(as.character(seq(min(sydf$monthday),