Displaying 20 results from an estimated 11000 matches similar to: "else if statement error"
2016 Dec 14
2
unexpected behaviour of search queries with mixed AND and OR
Hello,
I found out an unexpected behaviour of search queries with mixed
"AND" and "OR".
With search query "\( condA OR condB condC \)" I get an error:
Fatal: Use parenthesis when mixing ANDs and ORs
if I switch left and right OR-part and use the query
"\( condB condC OR condA \)"
I get a result, but it is not the expected result of the query
"\(
2004 Feb 03
1
output from multcomp and lm
Dear R-users
I analysed the same data set by two different ways;
analysis of covariance by using lm and anova functions
and multiple comparison by using simtest function in
the multcomp library.
The output from the analysis of covariance is;
> y<-lm(D~Cond+Q1,data=x)
> anova(y)
Analysis of Variance Table
Response: D
Df Sum Sq Mean Sq F value Pr(>F)
Cond 2
2009 Oct 03
1
if else statement error
Hello,
I am doing a if else statement in R. But it always comes out error such as
'unexpected symbol'
There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2,
a=3; all other situations, a=6. I don't know where it is wrong.
Here is my code
ini=3
b=4
if (ini==1) {
a=3
}
else if (ini>1 and b>2 ) {
a=3
}
else {a=6}
Thanks a
2007 Feb 25
1
Repeated measures logistic regression
Dear all,
I'm struggling to find the best (set of?) function(s) to do repeated
measures logistic regression on some data from a psychology experiment.
An artificial version of the data I've got is as follows. Firstly,
each participant filled in a questionnaire, the result of which is a
score.
> questionnaire
ID Score
1 1 6
2 2 5
3 3 6
4 4 2
...
2009 Oct 25
1
A naive question about permutation tests in the coin package
Dear R helpers,
I am trying to understand how to use the independence_test function in
the coin package. I think I suffer from a misunderstanding about what
the package does. Either that or I do not understand how to use it
properly. Specifically, I cannot understand if I can test independence
of arbitrary statistics.
Take the following example:
set.seed(10)
d <- data.frame(y = c(rnorm(10,
2004 Apr 29
3
Probability(Markov chain transition matrix)
Hello, My name is Maria, MBA student in Sanfransisco, USA.
In my credit scoring class, I have hard time making "transition matrix",
which explains probability especially in relation to "Markov chain model".
It is regarding people's monthly credit payment behavior. Does R have
function to caculate it? I am actually a novice in using 'R'. Please help
me!!!
Maria
2010 May 12
1
slot assignment in S4 classes
Hi R friends,
I'm still studying S4 classes and I have a question about slot assignment. Why would I have to use a special setter method [example 2 below] if I can assign data to a slot directly when I call new() [example 1 below]?
## first way to do it (the idiosyncratic way?)
setClass(Class = "TestClass", representation = representation(myDf = "data.frame"))
2001 Oct 08
3
testing diff for slopes and intercepts
I fit the model
fit<-lm(thresh~cond*Ne)
where
thresh is the reponse
cond is a factor with levels a, b, and c
Ne is a continuous indep var
I think of this full model as having three lines: thresh as a function of
Ne for each condition. Thus we have slopea, slopeb, slopec, inta, intb,
intc.
lm output my params
-------------------------
(Intercept) inta
condb intb - inta
condc
2011 Aug 25
1
Question about object permanence/marshalling
Hello,
I am trying to write some code that dumps R objects to the harddisk in a binary format so they can be quickly re-used later. Goal is to save time. The objects may be quite large (e.g. classes for a GUI). I was thinking that save() and load() would be suitable for this (until now I only thought it could be used for 'real' data, e.g. matrices, data.frames etc), but I am hoping any
2013 Mar 27
1
Pattern matching repeating digits
'lo, all,
Is there some (possibly undocumented?) way that I can pattern-match on a specified number of repeating digits? (Something similar to regular expressions' {})
Here's an example: let's say I have a string of things that need to be done for both extensions 233 and 255. I can either...
A) Repeat the exact same code for both extensions, like so:
exten =>
2016 Dec 14
0
unexpected behaviour of search queries with mixed AND and OR
On 14.12.2016 12:18, Juergen Raschke wrote:
> Hello,
>
>
> I found out an unexpected behaviour of search queries with mixed
> "AND" and "OR".
>
>
> With search query "\( condA OR condB condC \)" I get an error:
> Fatal: Use parenthesis when mixing ANDs and ORs
>
> if I switch left and right OR-part and use the query
> "\( condB
2010 Jul 21
1
fix()ing an S4 method
Hi R experts,
The fix() function canbe used to edit normal functions. I would like to know whether it's also possible to use something similar to edit a method of an S4 class. In other words, is there a fix-like function that allows me to edit method definitions without having to go back to the source code?
setGeneric (name="doStuff",def =
2019 Sep 04
2
possible bug in R's configure check for C++11 features
I am trying to compile R under a new setup, and frankly, I have had a lot
of problems, but I think the stuff below points to a possible bug in R's
(custom) configure checks for C++11/14/17, but not for C++98.
This is a report about R from the R-3-6 branch, with a svn checkout from
today, revision r77135.
In my case the compiler name is x86_64-conda_cos6-linux-gnu-g++, not g++. I
denote this
2020 Jan 15
4
Finding callees of a function
I searched the doxygen documentation and could not find a solution to my
task:
In a ModulePass running at EP_OptimizerLast, if I have a function F like in:
bool Foo:runOnModule(Module &M) {
LLVMContext &C = M.getContext();
for (auto &F : M) {
// magic here
if I want to know from which function (callee) each function is called -
how can I do this?
(so that I e.g. have
2017 Jun 03
3
How the LLVM handle the debug location information of continue keyword and right brace(loop end location)?
Hi paulr:
Thanks for your kindly response. Maybe I don't describe my question cleanly, let me show more information. From my side, I notice that whether we are in the continue keyword mode or we are in the right brace mode, the target of br instruction is the same, i.e. for loop
Continue Keyword Mode:
; <label>:6: ; preds = %3
br label
2017 May 04
2
complex tests failure
For a while I have been getting that the complex tests fails on RHEL 6.
The specific issue has to do with tanh (see below for full output from
complex.Rout.fail).
This is both with the stock compiler (GCC 4.4.7) and a compiler supplied
through the conda project (GCC 4.8.5). The compiler supplied through conda
ends up linking R to certain system files, so the binary is not completely
independent
2017 May 04
2
complex tests failure
Thanks.
I assume there is no way to control this via. environment variables or
configure settings? Obviously that would be great for something like this
which affects tests and seems to be a known problem for older C standard
libraries.
Best,
Kasper
On Thu, May 4, 2017 at 9:12 AM, Tomas Kalibera <tomas.kalibera at gmail.com>
wrote:
>
> As a quick fix, you can undefine HAVE_CTANH
2017 Jun 05
2
How the LLVM handle the debug location information of continue keyword and right brace(loop end location)?
If we had a very naïve way of generating IR, in the 'continue' case you would actually see TWO branch instructions: one to implement the 'continue' statement, and one as part of the control flow of the 'for' loop. The branch for the 'continue' statement would have the source location of the 'continue' and the branch for the control-flow of the 'for'
2017 May 05
1
complex tests failure
Thanks for the report, handled in configure in 72661 (R-devel).
I'll also port to R-patched.
Best
Tomas
On 05/04/2017 03:49 PM, Tomas Kalibera wrote:
>
> There is no way to control this at runtime.
> We will probably have to add a configure test.
>
> Best,
> Tomas
>
> On 05/04/2017 03:23 PM, Kasper Daniel Hansen wrote:
>> Thanks.
>>
>> I assume there
2011 May 09
3
Lua.c32 - user input / scripting
I'm trying to get this bit of code to work with the lua.c32 interpreter:
--- sample, the goal is to build a script that will allow me to enter a 4digit
mt and load the bios iso accordingly
print ("enter machine type :")
mt = io.read()
print ("you entered...",mt)
doStuff()
if (mt == "8141") then
syslinux.run_command("memdisk