On Jun 23, 2015, at 3:20 PM, boB Rudis wrote:
> You can do something like:
>
> aaa <- function(data, w=w) {
> if (class(w) %in% c("integer", "numeric", "double")) {
I think you will find that inherits(w, "numeric") is more compact and safer.
Both "integer" and "double" do inherit from "numeri
Hi,
I am trying to run R summary command through JRI to get the result for
mulitvariate Linear Regression
eg. result <- lm(Performance Score ~ Department+Grade,data = StudentData)
summary(result)
on running the above cmd using in R Console will fetch me below result:
Call:
lm(formula
Dear members,
I would like to conduct nonparametric two way ANOVA (repeated
measures) and post hoc test by using ARTool and lsmeans package.
I have the following data,
x<-runif(120)
A<-gl(3,40,labels=c("a1","a2","a3"))
B<-gl(2,20,120,labels=c("b1","b2"))
ID<-gl(20,1,120)
data<-data.frame(ID,x
Your question seems unclear, and you posted using HTML which makes things even
less clear (see the Posting Guide). Sharing data on the making list is much
more effective using the dput function as described in [1].
I note that your X values are very different, but your Y and Z values are
simila
Hi All and thanks for Help
I am doing an Repeated Measures ANOVA and the Bonferroni post hoc test for
my data using R project. The ANOVA gives a significantly difference between
the data but not the Bonferroni post hoc test.
> anova(aov2)
numDF denDF F-value p-value
(In
Note that objects can have more than one class, in which case your == and %in%
might not work as expected.
Better to use inherits().
cheers,
Steve
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Steven Yen
Sent: Wednesday, 24 June 2015 11:37a
To:
?with
e.g. with(mydata,aaa(v1))
-- Bert
Bert Gunter
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
-- Clifford Stoll
On Tue, Jun 23, 2015 at 2:39 PM, Steven Yen wrote:
> Dear Members
> I have a data frame as generated below. I like to be abl
Thanks! From this I learn the much needed class statement
if (class(wt)=="character") wt <- x[, wt]
which serves my need in a bigger project.
Steven Yen
On 6/23/2015 6:20 PM, boB Rudis wrote:
You can do something like:
aaa <- function(data, w=w) {
if (class(w) %in% c("integer", "numer
You can do something like:
aaa <- function(data, w=w) {
if (class(w) %in% c("integer", "numeric", "double")) {
out <- mean(w)
} else {
out <- mean(data[, w])
}
return(out)
}
(there are some typos in your function you may want to double check, too)
On Tue, Jun 23, 2015 at 5:39 PM,
Dear Members
I have a data frame as generated below. I like to be able to call a
function both with a vector and a vector (mydata$v1) in that data frame
(v1). The first call works, but the second does not. Can someone help me
with the second call? Thanks!!
---
mydata<-data.frame(matrix(1:20,ncol=
Martin:
One simple approach: write your own graphics functions that are simple
wrappers to the plot functions you use that set the par() values as
you wish. You could even put them in a package that is loaded at
startup. See ?Startup
My understanding is that so long as a graphics device remains o
​Greetings,
My dataset consist of the following columns:
Specimen C_flex C_rigid tau_flextau_rigidR_flex
R_rigid1 0.1782 0.29750.3290 0.3223 0.4338
0.51002 0.0527 0.10970.1780 0.1038 0.2364
0.1086.
where C, tau and R are statistic
Hi all,
Hopefully I post that correctly as I use "r-help" for the first time.
I wish to best-fit a 3D point cloud on another one, preferably with a
least-square adjustement method. Is there any existing solution (package,
function,...) available?
Here is a sample of my data where I want to fit the
i am attaching a .csv file, and the associated code worked out in R Studio.
i used the lavaan and sem packages, and conducted it.
now, i wish to draw the SEM model, as is available in AMOS other packages
and how does one draw the covariance arrows in R.
ONE STATISTICS oriented question - how can
Dear all
Did anybody tried to do time management graphs in R?
I could do some aggregation
xtabs(duration~person+Typ, data=temp)
but I would like to make also a graph to show which task (Typ) and when was
done by which person. The closest I came till this evening is following graph,
but it is
Hi,
I would like to set plot-options via par() and keep them for all plots that are
created thereafter.
Currently after each plot device the parameters I can set with par() are
reseted to their default value, at least on a Mac (R 3.2.1).
Is there a way to define the parameters for plotting once
Hi,
There are various tutorials for lavaan online, and even an entire book
on the R package. Have you worked through those examples and tutorials
successfully? If so, a clearer description of what you've tried and
what failed is required to be able to help you.
Without a reproducible example that
Dear Senior users of R/R Studio,
I am very new to this environment hence am unable to plot the SEM models
including use of graphic package ggplot.
Request for some help in getting the plots please.
Thanks,
-
Deva
__
R-help@r-project.org mailing l
Yours is (primarily) a statistical question, not a question about R,
and so off topic here. Post on a statistics list, like
stats.stackexchange.com instead. Better yet, consult a local
statistician. This is a thorny and difficult matter and, as you have
already discovered, is "full of sound and fur
All,
I am new to the vcd package and new to R too.
1) I have a lickert analysis based data set.
2) I am doing a hypothesis tests on the variables ( like, is there a
relationship between the choice of a Doctor based on the Patients Income ,
that's just one example)
3) I am building contingency tab
If df is the data.frame with values and you want nn samples, then this
is a slightly different approach:
# example data.frame:
df = data.frame(a1 = sample(1:20,50, replace = TRUE),
a2 = sample(seq(0.1,10,length.out =
30),50, replace = TRUE),
Dear Denis,
It's not multcomp which is too conservative, it is the pairwise t-test
which is too liberal. The pairwise t-test doesn't take the random
effect of Case into account.
Best regards,
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
te
Dear all,
In an attempt to generate a sample of observations from a four dimensional
copula from the package Copula, I got the following warning message and all the
observations are NA's:
Warning messages:
1: In rmvnorm(n, sigma = getSigma(copula)) :
sigma is numerically not positive definite
2
Hi, Ragia,
use
names( pr_sub$vector[ 1])
Regards -- Gerrit
On Tue, 23 Jun 2015, Ragia Ibrahim wrote:
Dear group,
I have the following object
pr_sub$vector[1]
14
0.07782809
class( pr_sub$vector[1])
[1] "numeric"
> length( pr_sub$vector[1])
[1] 1
how can I separate pr_sub$
24 matches
Mail list logo