similar to: unary "-" on logicals

Displaying 20 results from an estimated 1000 matches similar to: "unary "-" on logicals"

2001 Sep 28
1
change directory?
Please pardon a novice use question. Is there any way under the Win32 version of R (1.3.0) to change the working directory from the GUI command line? I see the "Change dir" entry under the File menu, but haven't found a corresponding command. Thanks in advance, -jh- ========================================= John M. Heumann, Agilent Technologies 815 14th St. S.W., Loveland, CO
2001 Sep 11
5
for loop question
In the windows version of R (1.3.0) is the following a bug, a known problem, or expected behavior: > for (i in 1:2) { + for (j in i+1:3) { + print(j) + } + } [1] 2 [1] 3 [1] 4 ???? [1] 3 [1] 4 ???? [1] 5 ???? > Conversely, the following behaves as expected: > for (i in 1:2) { + k <- i+1 + for (j in k:3) { + print(j) + } + } [1] 2 [1] 3 [1] 3 >
2001 Oct 09
1
sample() help
The documentation for sample() describes the optional "prob" argument as "A vector of probabilities of obtaining the elements of the vector being sampled". Both run time behavior and source code (routine FixupProb) suggest that "prob" can be a vector of non-negative, relative weights (i.e. not necessarily normalized). Should the help be updated to reflect this?
2001 Oct 18
1
if/else at 1.3.1
Under NT with 1.3.1 if (x == 1) { cat("Saw x=1\n"); } else { cat("Saw x!=1\n"); } works as expected, but if (x == 1) { cat("Saw x=1\n"); } else { cat("Saw x!=1\n"); } is currently giving me a syntax error on the "else" line. Apparently the parser considers the if statement to have ended as soon as it sees first closing brace, unless
2002 May 30
1
problem installing quadprog
When I try to build/install the quadprog package under R1.50 and NT4 it seems to have trouble finding blas routines. I'm currently using the generic blas routines, rather than ATLAS or some other tuned implementation: > Rcmd INSTALL d:/temp/quadrprog ... gcc --shared -s -o quadprog.dll quadprog.def quadprog.a quadprog_res.o -Lc:/a pps/rw1050/src/gnuwin32 -lg2c -lR
2002 May 30
0
Followup on quadprog installation
Oops... just realized there were a couple mistakes in the question I posted regarding installation of quadprog: 1) The gcc command line is shown wrapped to the next line. Please ignore this. 2) In addition to adding a -Lc:/apps/rw1050/bin option to the command line, I also added -lRblas. Thanks, -jh- ================================= John Heumann, Agilent Technologies,
2002 Nov 26
0
degenerate cases in RPART
RPART doesn't seem to handle the degenerate case when all training samples are drawn from a single class: > TrainType [1] 0 0 0 0 > TrainDat V1 V2 V3 V4 V5 1 0.6434392 0.5105860 0.3048803 0.3161728 0.5449632 2 0.1710005 0.5973921 0.1267061 0.6146834 0.7299928 3 0.6919125 0.8880789 0.9123243 0.9061885 0.9553663 4 0.3094843 0.6475508
2008 Nov 14
1
aov help
Please pardon an extremely naive question. I see related earlier posts, but no responses which answer my particular question. In general, I'm very confused about how to do variance decomposition with random and mixed effects. Pointers to good tutorials or texts would be greatly appreciated. To give a specific example, page 193 of V&R, 3d Edition, illustrates using raov assuming pure
2004 Mar 18
2
cannot allocate vector
Hi, I'm having trouble with glmmPQL. I'm fitting a 2 level random intercept model, with 90,000 cases and about 330 groups. I'm unable to get any results on the full data set. I can get it to work if I sample down to about 30,000 cases. But for models with N's much larger than that I get the following warning message:
2011 Nov 03
1
[LLVMdev] Why there is no unary operator in LLVM?
Hi llvmdev, I've noticed that there is no unary operator in LLVM. For unary operator such as Neg or Or operator, the IR builder just creates a binary operation with one dummy operand, 01823 <http://llvm.org/doxygen/classllvm_1_1BinaryOperator.html#a073c092ce74a122e898e435e60e84599> BinaryOperator <http://llvm.org/doxygen/classllvm_1_1BinaryOperator.html>
2017 Mar 16
0
Support for user defined unary functions
>>>>> Jim Hester <james.f.hester at gmail.com> >>>>> on Thu, 16 Mar 2017 12:31:56 -0400 writes: > Gabe, > The unary functions have the same precedence as normal SPECIALS > (although the new unary forms take precedence over binary SPECIALS). > So they are lower precedence than unary + and -. Yes, both of your > examples are
2003 Mar 13
1
apply() and unary operators
Hi everyone. What's going on here? > a <- matrix(1:4,2,2) > a [,1] [,2] [1,] 1 3 [2,] 2 4 > apply(a,2,sum) [1] 3 7 > apply(a,2,"+") [,1] [,2] [1,] 1 3 [2,] 2 4 > apply(a,1,"+") [,1] [,2] [1,] 1 2 [2,] 3 4 > help(apply) says that "+" should be quoted but is otherwise silent on unary
2010 Feb 03
1
Proposal unary - operator for factors
Hi all, Why not make the unary minus operator return the factor with levels reversed? This would make it much easier to sort factors in descending order in part of an order statement. Hadley -- http://had.co.nz/
2017 Mar 16
0
Support for user defined unary functions
Jim, This seems cool. Thanks for proposing it. To be concrete, he user-defined unary operations would be of the same precedence (or just slightly below?) built-in unary ones? So "100" %identical% %chr% 100 would work and return TRUE under your patch? And with %num% <- as.numeric, then 1 + - %num% "5" would also be legal (though quite ugly imo) and work? Best, ~G On
2017 Mar 16
0
Support for user defined unary functions
I don't have a positive or negative opinion on this yet, but I do have a question. If I define both unary and binary operators with the same name (in different frames, presumably), what would happen? Is "a %chr% b" a syntax error if unary %chr% is found first? If both might be found, does "a %chr% %chr% b" mean "%chr%(a, %chr% b)", or is it a syntax error
2008 Mar 13
2
Making custom unary operators in R
Hello, Is there a way to define a custom unary operator in R (other than making a class and 'overloading' the normal unary operators in R)? The documentation seems to suggest that only custom binary operators are possible with the ``%abc%``construct but I was wondering whether any one has done so. None of the RSiteSearch or RSeek queries I posed suggested that this question had
2009 Mar 04
0
Error in -class : invalid argument to unary operator
Hi guys I have been using R for a few months now and have come across an error that I have been trying to fix for a week or so now.I am trying to build a classifer that will classify the wine dataset using Naive Bayes. My code is as follows library (e1071) wine<- read.csv("C:\\Rproject\\Wine\\wine.csv") split<-sample(nrow(wine), floor(nrow(wine) * 0.5)) wine_training <-
2011 Feb 22
1
[LLVMdev] unary floating point operations using clang
Hello, Is there a way of generating unary floating point operations (like ISD::FABS, ISD::FSIN, ...) from C code using clang? I am building a backend for a machine that has hw support for these ops and I need a way to test them. Thanks, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL:
2002 Aug 08
1
The unary - operator and matrix column labels
I am making some changes to the permax library (so that it will accept NA's). This function performs a permutation analysis to identify discriminating attributes distinguishing two groups of observations. It takes the form (at its most simplistic): permax(data, ig1) where ig1 is one group of interest. The other group (if not specified) is assumed to be the remaining observations, namely,
1998 Jan 05
1
unary !
[spill over from R-core] >>>>> "TL" == Thomas Lumley <thomas@biostat.washington.edu> writes: TL> On Sun, 4 Jan 1998, Kurt Hornik wrote: >> Another thing I noticed when playing with chron is that apparently >> code like if (!(length(value)) works in S but not in R. The error >> in R is unary ! is only defined for logical