Thanks David.This is working perfectly!
On Fri, Jul 29, 2016 at 9:00 PM, David Winsemius
wrote:
>
> > On Jul 29, 2016, at 5:52 PM, David Winsemius
> wrote:
> >
> >
> >> On Jul 29, 2016, at 5:08 PM, Jun Shen wrote:
> >>
> >> Thanks Jeff/David for the reply. I wasn't clear in the previous
> mess
> On Jul 29, 2016, at 5:52 PM, David Winsemius wrote:
>
>
>> On Jul 29, 2016, at 5:08 PM, Jun Shen wrote:
>>
>> Thanks Jeff/David for the reply. I wasn't clear in the previous message. the
>> problem of using na.omit is it will omit the whole row where there is at
>> least one NA, even when
> On Jul 29, 2016, at 5:08 PM, Jun Shen wrote:
>
> Thanks Jeff/David for the reply. I wasn't clear in the previous message. the
> problem of using na.omit is it will omit the whole row where there is at
> least one NA, even when some variables do have non-NA values.
Did you actually run the
Thanks Jeff/David for the reply. I wasn't clear in the previous message.
the problem of using na.omit is it will omit the whole row where there is
at least one NA, even when some variables do have non-NA values.
For example: let's define a new function
N <- function(x) length(x[!is.na(x)])
test <
Hi
There are some System commands that grab a computers settings to suit your
purpose but I do not know what they are.
May be tikz or Java or python based packages will improve things but I do not
know them at all
Regards
Duncan
From: Dalthorp, Daniel [mailto:ddalth...@usgs.gov]
Having experienced some frustration myself when I first started with R many
years ago, I can relate to your apparent frustration. However, if you would
like to succeed in using R I strongly recommend learning R and not trying to
write Haskell or Erlang or C or Fortran or any other language when
The parameterization for Weibull in the 'survival' package corresponds to
base R's dweibull, etc. suite as 1/scale --> shape and exp(coef[1]) -->
scale
On Fri, Jul 29, 2016 at 1:07 PM, Christopher W. Ryan
wrote:
> I'm trying to run a Weibull parametric survival model for recurrent event
> data,
I'm trying to run a Weibull parametric survival model for recurrent
event data, with subject-specific frailties, using survreg() in the
survival package, and I'm having trouble understanding the output and
its notation, and how that translates to some of the books I am using as
references (DF M
Been off the grid for the last year? MS bought Revolution R.
Sent from my iPhone
> On Jul 29, 2016, at 11:30 AM, Christopher W. Ryan
> wrote:
>
> This might be a bit off-topic, but up until recently (a day or so ago?) I
> loved using inside-r.org as a quick and easy way to access help pages
Hi Yihui,
Seems like the issue was with the wordcloud. I used wordcloud2 and it
worked handsomely.
& thanks for suggesting wordcloud2 seems far better than wordcloud.
tc.
On Sat, Jul 30, 2016 at 12:00 AM, Shivi Bhatia wrote:
> Thanks for the suggestion. even without png isnt not working.
>
>
Thanks for the suggestion. even without png isnt not working.
I will check this new package. Thank you.
On Fri, Jul 29, 2016 at 11:45 PM, Yihui Xie wrote:
> Typically you don't need to open the png() device manually. Try
> comment out that line.
>
> BTW, I'm not sure which wordcloud package you
This might be a bit off-topic, but up until recently (a day or so ago?)
I loved using inside-r.org as a quick and easy way to access help pages
on R commands. Took me to what I needed without any fuss. Now that URL
redirects to the "Microsoft R Application Network"? Looks to be
something relat
Typically you don't need to open the png() device manually. Try
comment out that line.
BTW, I'm not sure which wordcloud package you were using, but this one
is the best one I have seen: https://github.com/Lchiffon/wordcloud2
Regards,
Yihui
--
Yihui Xie
Web: http://yihui.name
On Fri, Jul 29, 2
Dear Team,
I have created a text mining solution for one of my business owners.
I am sharing with his using RMD via HTML. All is working ok however the
WordCloud does not populate any output in RMD file.
Few months back when this happened on R studio i searched and used
dev.off() to shut down an
For what it's worth (perhaps little...), I would normally do
for (pn in pathnames) source(pn)
It's clearer to read and won't return a strange value. I doubt there will
be a noticeable difference in speed. It can easily be extended to be more
informative, as in
for (pn in pathnames) {
cat('--- n
>> I still don't understand why you want Reduce to to lapply's
>> job. Reduce maps many to one and lapply maps many to
>> many.
Say you want to map a function over a subset of a vector or list? With the
generalised version of Reduce you map many-to-one, but the one can be a
'complex' structure.
Dear Kathryn
I think that the author of metafor has addressed this
http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates
The other tips on that site are well worth reading too.
On 29/07/2016 14:44, Morris, Kathryn wrote:
I am running a meta-analysis using metafor and get
I think you should consult with a local statistician. Generally
speaking, statistical questions like this tend to be OT here, and you
appear to be sufficiently confused about the statistical issues that
online posts would not be sufficient.
Cheers,
Bert
Bert Gunter
"The trouble with having an o
Hi Team,
I am new to using apply function in R.
I want to find out the empirical quantiles of all items in a list.
## Fitting Kernal Density function
Emp_Marginals<-apply(M_Diff_Final,2,kde)
### Simulated variables
Sim_Cop<-abs(rmvnorm(1,mean=apply(M_Diff_Final,2,mean),sigma=cov(M_Diff_Final)
What's wrong with:
result <- with(df, x/n) ? Do I misunderstand?
(and what's the p = .065 or [[1]] have to do with the estimated prob,
as you are not actually doing any test?)
Finally, if you really do this sort of thing, ?mapply (and ?with) can
be useful; e.g. you could have rewritten your loo
Reduce (like lapply) apparently uses the [[ operator to
extract components from the list given to it. X[[i]] does
not attach names(X)[i] to its output (where would it put it?).
Hence your se
To help understand what these functions are doing try
putting print statements in your test functions:
> da
I am running a meta-analysis using metafor and getting what seem to be
conflicting results.
#analysis with species moderator
cropMeta.species<-rma(cropyi, cropvi, data=dataCropMeta,
mods=~dataCropMeta$species - 1, method="HE")
The output for the analysis using species as a moderator shows esti
Jeff,
Thanks so much for your help. I feel pretty confident in saying that there is
no way I could have figured out how to open that file (in R) by myself. It was
hard enough to get the data I needed once I could read the file. In case
anyone on the list is interested, here is a working solu
I can't immediately see it in the help text but it seems that source
returns a list with two named elements; value and visible.
I surmise that it is returned using withVisible (qv).
KJ
On 29/07/2016 13:26, jim holtman wrote:
Hard to tell without seeing the scripts. Do you have a matrix in yo
Dear Frank,
What you see isn't a "message" but the result returned by sapply(). The ?s
indicate that sapply() didn't know what to do with the corresponding element.
In an individual use of source(), the result, a 2-element list, is returned
invisibly, so you don't see it.
To see what's going
Hard to tell without seeing the scripts. Do you have a matrix in your
scripts that have "value" and "visible" as row names? You probably have
some statement that is causing output and so the problem is "your" as to
how to avoid the message. So look at your scripts to see if anything
refers to ei
Dear list,
I have one folder named "scripts_JMbayes", wich contains 10 R scripts.
I can read them properly by doing:
> pathnames <- list.files(pattern="[.]R", path="Mydir/scripts_JMbayes",
> full.names = TRUE)
> sapply(pathnames, USE.NAMES = FALSE, FUN = source,)
However, R generates the fol
Hi Ross,
first, I have a side question: is there a particular reason why you
are using parse(eval()) in your queries? I know sometimes there is no
other solution if you only use exported functions, but you should try
not to. It makes for brittle code that breaks easily depending on how
variables
Le 29/07/2016 à 11:20, Rolf Turner a écrit :
On 29/07/16 20:52, Alain D. via R-help wrote:
Dear list,
I have a dataframe df:
df<-data.frame(x=c(5,32,18,3,17), n=c(11,200,432,20,60))
Now I want to run n=nrow binom.test() with x being the number of
success and n
the number of trials and then
Dear Alain,
The problem is that you save the results of each iteration in df$VAR. So
obviously, you overwrite df$VAR at each iteration.
What you need to do it to create an empty vector that contains the right
number of elements and then iteratively fill this list. You can then
combine df and
On 29/07/16 20:52, Alain D. via R-help wrote:
Dear list,
I have a dataframe df:
df<-data.frame(x=c(5,32,18,3,17), n=c(11,200,432,20,60))
Now I want to run n=nrow binom.test() with x being the number of success and n
the number of trials and then store the results as a new VAR in df.
I tried
Hi Alain,
You are probably storing the result, replicated five times, in df$VAR.
Each cycle of the loop replaces the last value with the current value.
If you really want the entire output of binom.test in the last column:
multi.binom.test<-function(xs,ns) {
reslist<-list()
for(i in 1:length(xs
> On 29 Jul 2016, at 10:52, Alain D. via R-help wrote:
>
> Dear list,
>
> I have a dataframe df:
>
> df<-data.frame(x=c(5,32,18,3,17), n=c(11,200,432,20,60))
>
> Now I want to run n=nrow binom.test() with x being the number of success and n
> the number of trials and then store the results a
Hi Roslina,
This may be what you want:
sum_balok<-
as.vector(by(aggbalok_2009_2014$x,aggbalok_2009_2014$year,sum,na.rm=TRUE))
cbind(year=2009:2014,sum_balok)
I don't have the data for the other measures, but you could calculate
the sums as you did below and then add them to the cbind arguments.
Dear list,
I have a dataframe df:
df<-data.frame(x=c(5,32,18,3,17), n=c(11,200,432,20,60))
Now I want to run n=nrow binom.test() with x being the number of success and n
the number of trials and then store the results as a new VAR in df.
I tried
for (i in 1:nrow(df)){
df$VAR<-(binom.test
Jeremiah -
neat - that's one step closer, but one small thing I still don't understand:
> data <- list(one = c(1, 1), three = c(3), two = c(2, 2))
> r = Reduce(function(acc, item) { append(acc, setNames(length(item),
names(item))) }, data, list())
> str(r)
List of 3
$ : int 2
$ : int 1
$ : int
Hi,
Thanks for the response. Unfortunately this did not solve my problem and
may be the way I represented my data would be the problem. I am not sure
that I can give a link for the data which will give a clear representation.
If that is not a proper way, I have to follow my original method.
Regar
37 matches
Mail list logo