Displaying 20 results from an estimated 400 matches similar to: "gmp::bigq vs. MASS::fractions"
2023 Jan 07
1
gmp::bigq vs. MASS::fractions
On Sat, 7 Jan 2023 17:29:35 +0100
Sigbert Klinke <sigbert at wiwi.hu-berlin.de> wrote:
> > x <- (0:7)/7
>
> > MASS::fractions(x)
>
> [1] 0 1/7 2/7 3/7 4/7 5/7 6/7 1
>
> > gmp::as.bigq(x)
>
> Big Rational ('bigq') object of length 8:
>
> [1] 0
> 2573485501354569/18014398509481984 2573485501354569/9007199254740992
>
2006 Mar 14
4
Generating a PostScript graphics under Windows
Hi,
I'am trying to generate a PS Graphic under Windows with a fixed location via
postscript(file="C:\\test.ps")
But I always become the error:
unable to start device PostScript
can not open 'postscript' file argument 'c:\test.ps'
There must be a very simple thing, that I make wrong.
Thanks in advance
Sigbert Klinke
2023 Mar 06
1
legend: interplay between title and y.intersp
Hi,
I think you are right, legend cannot do it. I have now created my own
legend function where I changed only one line and now it works the way I
want it to. But I'm not sure if that might not have other side effects.
I have the impression that the legend and the title start at the same
y-position (try y.intersp=0). Only if y.intersp is big enough, then it
leads to a non-overlap of
2005 Aug 26
3
Matrix oriented computing
Hi,
I want to compute the quantiles of Chi^2 distributions with different
degrees of freedom like
x<-cbind(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99, 0.995)
df<-rbind(1:100)
m<-qchisq(x,df)
and hoped to get back a length(df) times length(x) matrix with the
quantiles. Since this does not work, I use
x<-c(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975,
2009 Jan 29
4
Text in a character vector to indicate "ifelse" argument
Hello
I have a data set that looks like this;
> b2
dato chr status PRRSvac
PRRSsanVac PRRSsanDk PRRSdk
33 2007-12-03 090432 R?d SPF
34 2007-02-09 090432 R?d SPF+sanDK
35 2002-12-17 090432 R?d SPF+DK
36 2002-11-27 090432 R?d SPF+sanDK
37 2002-07-23
2010 Feb 01
3
playwith error message
Hi,
I'am using the playwith library to write my own small GUI application.
But I get the following error under Windows and Linux (Ubuntu):
Error in if ((modeOK %in% c("Identify", "Brush")) && (actions$ident == :
Fehlender Wert, wo TRUE/FALSE n?tig ist
Under linux my R program simply continues, but under Windows it stops.
Since it is not in my code, has anyone
2010 Jul 29
2
Mailing list for download
Hi,
is it possible to get all the mails of the mailing list / mail archives
for download (preferably in XML format)?
Thanks Sigbert
2006 May 17
2
No output in sourced R program
Hi,
If I type it in the command line I get, as expected:
> 1:30
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
23 24 25
[26] 26 27 28 29 30
> q()
Save workspace image? [y/n/c]: n
If I create a program 02e451444d6a46acf551996579092c911b90aa8e.R and run
it I get
R : Copyright 2006, The R Foundation for Statistical Computing
Version 2.3.0 (2006-04-24)
>
2007 May 31
2
Factor analysis
Hi,
is there any other routine for factor analysis in R then factanal?
Basically I'am interested in another extraction method then the maximum
likelihood method and looking for unweighted least squares.
Thanks in advance
Sigbert Klinke
2024 Jul 15
2
reticulate + virtual environments
Hi,
I am using reticulate and a virtual environment (not conda) to run
Python scripts from RStudio. However, when I try to use my own
(existing) virtual environment, reticulate does not use it. If I run my
scripts, the installed modules (e.g., py_install("pandas",
"mmstat4.hu.data")) are not found. I believe this happens because
reticulate is using r-reticulate instead of
2023 Mar 04
1
legend: interplay between title and y.intersp
Set the legend position explicitly with x and y values and add xpd = TRUE
to the legend call to clip the plot to the figure region and not the plot
region (the default). Something like this (you may have to fool around with
y.intersp, etc. to allow enough space between the legend lines):
plot(c(0,1), c(0,1), type="n")
legend(x = .4, y = 1.25, legend=c("", "",
2024 Apr 10
1
Problem with base::order
? Wed, 10 Apr 2024 09:33:19 +0200
Sigbert Klinke <sigbert at wiwi.hu-berlin.de> ?????:
> decreasing=c(F,F,F)
This is only documented to work with method = 'radix':
>> For the ?"radix"? method, this can be a vector of length equal to
>> the number of arguments in ?...? and the elements are recycled as
>> necessary. For the other methods, it must be
2023 Feb 23
2
Palettes {grDevices} - wrong number of colors returned?
Hi,
I would have expected that I get always 3 colors as result which is not
true:
hcl.colors(3, alpha=c(0, 0.5, 1)) # 3 colors
rainbow(3, alpha=c(0, 0.5, 1)) # 3 colors
heat.colors(3, alpha=c(0, 0.5, 1)) # 3 colors
terrain.colors(3, alpha=c(0, 0.5, 1)) # 6 colors
cm.colors(3, alpha=c(0, 0.5, 1)) # 6 colors
topo.colors(3, alpha=c(0, 0.5, 1)) # 9 colors
R-Version and
2024 Jul 15
1
reticulate + virtual environments
Have you tried https://rstudio.github.io/reticulate/ ?
Generally speaking, complex nonstandard package specific questions
such as yours rarely get a reply here -- there are 20,000+ packages
(and counting) after all! As reticulate was created by and integrated
with RStudio/Posit, I would think their site and help resources might
be a better venue. Of course, if you don't use RStudio, you may
2007 Sep 10
2
mode or parameters of readBin
Hi,
> sapply(formals("readBin"), mode)
con what n size signed endian
"name" "name" "numeric" "logical" "logical" "call"
returns for the mode of size logical. But in the documentation is said
that size should be integer. Does anyone know why the mode is logical?
Thanks in advance
2012 Mar 28
1
rep with bigz in gmp
Hi
With package:gmp, is this an expected behavior?
> rep(1:3, rep(3, 3))
[1] 1 1 1 2 2 2 3 3 3
> rep(as.bigz(1:3), rep(3, 3))
Big Integer ('bigz') object of length 9:
[1] 1 2 3 1 2 3 1 2 3
This code is used inside `outer`, so more worse
> outer(1:3, 1:3, `*`)
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 2 4 6
[3,] 3 6 9
> outer(as.bigz(1:3),
2023 Oct 30
1
Dynamically create a (convenience) function in a package
If you don't know the name of the attributes in advance, how can you know
the function name to be able to call it? This seems like a very flawed
approach.
Also, I would discourage the use of eval(parse(text = )), it's almost
always not the right way to do what you want to do. In your case,
eval(bquote(function(x) attr(x, .(n))))
would be better.
On Mon, Oct 30, 2023, 06:28 Sigbert
2018 Feb 13
1
Syntax highlighting
Hi,
I would like know if there are any plans for some "standardized" syntax
highlighting of R code?
* Currently I'm using minted for my LaTeX slides with pygmentize and I
do not know what scheme is used for highlighting the R code.
* RStudio uses (as default) TextMate (Text editor for MacOS)
highlighting for R code.
* The R package "highr" just defines CSS classes and
2010 Jul 19
1
Access to R help database
Hi,
from the documentation of help.search I think that fields like "concept"
and "keywords" in the R help database exists. How can I access them from R?
If I do
> help<-help.search("blabla")
> colnames(help$matches)
[1] "topic" "title" "Package" "LibPath"
then I get back only back these 4 fields.
Thanks Sigbert
2023 Mar 04
1
legend: interplay between title and y.intersp
Hi,
my MWE is not working as expected:
plot(c(0,1), c(0,1), type="n")
legend("top", legend=c("", "", "a"), col=c("blue", "red", "green"),
title="test", y.intersp=0.2, lwd=1)
The lines are not below the title. I want (nearby) lines as in the plot,
but below the title. Is there a way to achieve this?