I am a Professor of Statistics at Indira Gandhi Krishi Vishwavidyalaya,
Raipur, India. While teaching in class about analysis of variance using R,
I was doing a one-way analysis for the two data-sets given below in the
R-class. I got a typical error in "emmeans" package, please help:
Data-set-1:
-
If I was to make a totally wild leap, I would say it looks like someone using
an inappropriate text editor such as Microsoft Word to edit R code.
Stuti, please carefully read and follow the recommendations in the Posting
Guide mentioned at the bottom of this and every post on this mailing list
`Hi Stuti,
Your problem is that if you want to have more than one command on a
single line, you must separate them with a semicolon.
j <- function() {
if(!exists ("a")){
a <- 1
} else{
a <- a+1
}; print(a)}
The above will work, but is usually considered bad form. What follows
is usually easie
Hello,
I don't see the error you mention.
j <- function() {
if(!exists ("a")){
a <- 1
} else{
a <- a+1
}
print(a)
}
j()
[1] 1
sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Wi
> j <- function() {
+ if(!exists ("a")){
+ a <- 1
+ } else{
+ a <- a+1
+ } print(a)}
Error: unexpected symbol in:
"a <- a+1
} print"
> j <- function() {
+ if(!exists ("a")){
+ a <- 1
+ } else{
+ a <- a+1
+ } print("a")}
Error: unexpected symbol in:
"a <- a+1
} print"
[[alternative HTML
Dear all,
I use R version 2.15.1 on x86_64-pc-linux-gnu (64-bit).
I run a simulation where I have to call a series of R scripts in batch mode.
When I run the following two lines, this works well for PERIOD='17' but not for
PERIOD='08':
R CMD BATCH --no-save "--args PERIOD='08' YEAR='203O' SC
6 matches
Mail list logo