similar to: modulus operator gets syntax error (PR#925)

Displaying 20 results from an estimated 2000 matches similar to: "modulus operator gets syntax error (PR#925)"

2001 Apr 28
2
Modulus operator??
I'm trying to do a modulus operator in R-1.2.2 on Windows -- specific version: R : Copyright 2001, The R Development Core Team Version 1.2.2 Patched (2001-03-22) Here's what the R language manual says: "R contains a number of operators. They are listed in the table below. [snip] % Modulus, binary" Here's what happens on the R console: > records <- 100000 >
2001 Dec 26
3
bug with var(rep(1e30, 3)) (PR#1228)
There seems to be a bug with var() when the argument is a vector with exactly three values of 1e30 (or close to this value). This does not happen with twice, four (or more) times this value, or another value. > var(rep(1e30, 3)) [1] 2.971056e+28 > var(rep(1.2e30, 3)) [1] 2.971056e+28 > var(rep(0.9e30, 3)) [1] 2.971056e+28 > var(rep(0.8e30, 3)) [1] 0 > var(rep(1e29, 3)) [1] 0 >
2002 Nov 29
1
KS for goodness of fit
Dear All, I have two distributions which I don't their nature. I want to check whether they come from the same distribution. I know that I can use KS test however the standart function ks.test applies only the ks test for testing the difference of two samples (non-parametric). By the way the distribution are of Euclidean distances. One of observed and the other of shuffled data. Thanks, Ron
2003 Apr 07
3
New window for plot()
Hi, Can anybody tell me how to open new a new window for plot()? Thanks. Minghua
2001 Sep 13
2
image plot legends
Hi, is there anybody knowing a possibility to produce a legend (describing the color scheme) in an image plot in R. In S-Plus this works using image.legend. Thank's in advance. INGO -- ----------------------------------------------------------------- Ingo Roeder Institute for Medical Informatics, Statistics and
2001 Oct 10
2
How to comment out multiple lines in R source code?
Hi, Is there a way to comment out multiple lines at once in R source code like C language's /* */ struct? This is quite useful when one is testing different sections of a source code. Thanks, Jonathan -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2002 Dec 19
2
More on scan()
Hi, If I have a CSV file which has several comments at the top, and the data start immediately after the line: @DATA Is it possible to use the scan() command to get the CSV data into R, by only reading the lines after @DATA? If so, how can I do it? Cheers, Kevin ------------------------------------------------------------------------------ /* Time is the greatest teacher, unfortunately it
2001 Sep 07
2
adding logical vector to data frame
Hello. I'm afraid that I'm missing something very obvious this afternoon... When I add a column to a data.frame (by assigning to a "new" column name a logical vector), I thought that I had (at least) 3 options to do so: R> j <- data.frame (x=1:2) R> j$y <- c(TRUE,FALSE) #assignment 1 R> str(j) `data.frame': 2 obs. of 2 variables: $ x: int 1 2 $ y: logi
2001 Sep 13
3
OT: ps -> eps -> MS Word
I've created a bunch of postscript trees (post.rpart), which I subsequently edit in Adobe Acrobat 4.05 (I need additional labelling that isn't easy to add with R). After editing the labels and annotations using Acrobat, I then export the file to Adobe's .eps format so I can insert the picture into a Microsoft Word 2000 document. The .pdf file distilled from the .ps file is
2001 Sep 10
5
?? hmm ??
Hello again! thanks to all who helped with overlay plots - v. easy in the end. Anyway, another new(ba)bee type question - the gurus will cringe I'm sure! Q. simple R function mm <- function (u) { x <- u$GDP x m <- mean(x) m } When the function is called the vector "x" does not get printed from within the function, but the mean value "m" does, why? I
2003 May 19
4
modulus operator?
Is there a modulus operator in R? Anna
2003 May 19
0
FW: modulus operator?
try "%%" as the modulus operator and "%/%" for integer division eg 5%%2 equals 1 John Marsland > > -----Original Message----- > > From: Anna H. Pryor [mailto:anna at ptolemy.arc.nasa.gov] > > Sent: 19 May 2003 16:56 > > To: R Help > > Subject: [R] modulus operator? > > > > > > > > Is there a modulus operator in R?
2006 Jan 30
4
Integer bit size and the modulus operator
I am a statistician and I come up to an interesting problem in cryptography. I would like to use R since there are some statistical procedures that I need to use. However, I run into a problem when using the modulus operator %%. I am using R 2.2.1 and when I calculate modulus for large numbers (that I need with my problem) R gives me warnings. For instance if one does: a=1:40; 8^a %% 41 one
2012 Feb 22
3
OpenMP and random number generation
Dear all, Now that R has OpenMP facilities, I'm trying to use it for my own package but I'm still wondering if it is safe to use random number generation within a OpenMP block. I looked at the R writing extension document both on the OpenMP and Random number generation but didn't find any information about that. Could someone tell me if it is safe or not please ? Best, Mathieu
2006 Jan 30
2
[R] Integer bit size and the modulus operator (PR#8541)
On 1/30/2006 1:39 PM, Ionut Florescu wrote: > Thank you for the quick reply, I will look into the R packages. > For crashing R try this: > > generator.zp=function(x,p) > {a=1:(p-1); b=x^a%%p; > if(all(b[1:(p-2)]!=1)&&(b[p-1]==1)){return(x, " Good ")} > else{return(x, " No Good, try another integer ")} > } Thanks, I can reproduce the crash using
2005 May 11
7
bug in modulus operator %% (PR#7852)
The following can't be right, first rw2010: > 1 %% 0.001 [1] 0.001 Then rw2001: > 1 %% 0.001 [1] -2.081668e-17 > and the last seems about right. -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus.
2000 May 18
1
tutorial "R pour les débutants" is available on CRAN
Dear R-users, Thanks to Friedrich Leisch, my document "R pour les d?butants" is available on CRAN in the contributed documentation section: http://cran.r-project.org/doc/contrib/Rdebuts.pdf. It is written in French. "R pour les d?butants" ("R for beginners") gives a starting point for people with no experience with R (or S). I tried to explain the basics in the
2000 May 18
1
tutorial "R pour les débutants" is available on CRAN
Dear R-users, Thanks to Friedrich Leisch, my document "R pour les d?butants" is available on CRAN in the contributed documentation section: http://cran.r-project.org/doc/contrib/Rdebuts.pdf. It is written in French. "R pour les d?butants" ("R for beginners") gives a starting point for people with no experience with R (or S). I tried to explain the basics in the
2008 Nov 03
1
How to calculate modulus of complex number
suppose I have following complex number : a = -0.0475983+0.5364486i This number I got as an eigen value of a matrix. Now I would like to calculate the Modulus of this complex number. Is there any function for doing that? Regards, -- View this message in context: http://www.nabble.com/How-to-calculate-modulus-of-complex-number-tp20308154p20308154.html Sent from the R help mailing list archive
2004 Dec 08
2
Modulus Problem
R users, I am having a problem with the modulus operator for large numbers as follows, a <- 2 n <- 561 ## n is the first Carmichael number, so by Fermat's Little Theorem the below should equal zero. (a^(n-1) - 1) %% n [1] 2.193172e+152 ## Seems that R and Fermat disagree ## Also, 1000000000000000000 %% 11 [1] -32 This seems like a bug. Should I be avoiding integer math for large