Displaying 16 results from an estimated 16 matches for "npoint".
Did you mean:
point
2007 Oct 29
2
Changing size of lattice plot?
Hi
I am having a bit of difficulty with changing the canvas size on a
trellis/lattice plot. I am plotting two "cubes" of 3-dimensional random
numbers, as follows:
library(gsl)
library(lattice)
q <- qrng_alloc(type="sobol", 3)
npoints <- 200
rs <- qrng_get(q,npoints)
# Plot the normal variates in a 3-dim cube
p1 <- cloud(rnorm(npoints) ~ rnorm(npoints) + rnorm(npoints), xlab="x",
ylab="y",
zlab="z", pch=21, main=paste(npoints,"3-Dimensional ~N(0,1)"))
p2 <- cloud(rs[,1] ~ rs[...
2013 Apr 30
1
Trabajar con un argumento opcional como escalar o vector.
...pcional debería poder ser escalar o vector.
Necesito definir una función 'aplicaratodasfilas' que llama a otra función 'atomica' que no admite vectores y que requiere también argumentos opcionales.
Pongo un ejemplo:
# Se aplica a cada fila.
atomica <- function(xbegin, xend, npoints = 5, ...) { # los argumentos opcionales ... son necesarios ya que hay más funciones dentro
seq(xbegin,xend,length.out = npoints) # la función seq no admite vectores
}
aplicaratodaslasfilas <- function(data, ...) {
lapply(1:dim(data)[1], function(i,...) {
atomica(xbegin=data[i,1], xend...
2010 Jan 21
2
about loops
Hello !
I have a quick question about loops.
For example, I have a 1 * 1 square and its inscribed circle tangent i, whose radius, of course, is also 1.
The loop here is as the following:
generate n points, say 5, in the square randomly repeatedly until we have five in total in the circle, then we stop, otherwise we continue.
I do not know how !
Help me Please ~
Thank you very much for
2005 May 16
0
Turnpoints (pastecs): How to specify a limit on the number of tur npoints?
Hello,
I'm trying to get a few turnpoints for a financial time series. There is a
function in pastecs that does that. However, I get a large number of
turnpoints:
library(pastecs)
data(EuStockMarkets)
dax <-EuStockMarkets[,1]
plot(dax)
turnp <-turnpoints(dax)
summary(turnp) #gives 925 peaks/pits!!!
How can specify to get only...
2011 Dec 15
3
From Distance Matrix to 2D coordinates
Dear All,
I am struggling with the following problem: I am given a NxN symmetric
matrix P ( P[i,i]=0, i=1...N and P[i,j]>0 for i!=j) which stands for the
relative distances of N points.
I would like use it to get the coordinates of the N points in a 2D
plane. Of course, the solution is not unique (given one solution, I can
translate or rotate all the points by the same amount and generate
2002 Jun 19
4
drawing ellipses
Hello again,
First I want to thank all the people who answered my question about line
width in graphs. I promise I will learn the 'par' help page by heart for
the end of the month !
I now want to trace some ellipses to emphasize groups of data. I found how
to trace circles with 'symbols()', but no ellipse. I'm planning on writing
my own function based on
2004 Mar 19
0
How to do a truncated regression
...o y, etc.
There also may be other parameters I've not set correctly. The code
that
actually performs the regression is below:
"trunc <- survreg(Surv(c,yx[,2],event=rep(1,length(yx[,2]))) ~ yx[,1],
dist='gaussian', data=yxfr)" , where c is already defined as
c<-rep(200,npoints), where npoints is the number of (x,y) data pairs.
I should mention that I have R v1.8.1, and to perform these
calculations I've invoked librarys MASS and SURVIVAL. I have tried to
look this up in the manuals, but so far I've not found anything on
truncated regression.
If you coul...
2006 May 19
1
trouble with plotrix package
Hello list,
I wrote a simple program to plot data on polar axes, taking advantage of
the plotrix package and its function radial.plot. The basic plot works
fine, but I am having difficulties with the formatting. There are three
problems, but I thought I would attack them one at a time. Here is the
first:
If my data set contains values with all vector lengths between 0 and 100
(and various
2010 Nov 11
3
Evaluation puzzle
..."why" of
this has me baffled, however.
Here is a simple test case, using a very stripped down version of survexp:
survexp.test <- function(formula, data,
weights, subset, na.action, rmap,
times, cohort=TRUE, conditional=FALSE,
ratetable=survexp.us, scale=1, npoints, se.fit,
model=FALSE, x=FALSE, y=FALSE) {
call <- match.call()
m <- match.call(expand.dots=FALSE)
# keep the first element (the call), and the following selected arguments
m <- m[c(1, match(c('formula', 'data', 'weights', 'subse...
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
...al[i] %in% rownames(coord.quali.sup))
group.quali.sup <- c(group.quali.sup, grep(partial[i],
rownames(coord.quali.sup)))
}
}
}
if (!is.null(ellipse)) {
coord.ellipse <- ellipse$res
npoint.ellipse <- ellipse$call
}
else coord.ellipse <- NULL
if (!is.null(ellipse.par)) {
coord.ellipse.par <- ellipse.par$res
npoint.ellipse.par <- ellipse.par$call
}
else coord.ellipse.par <- NULL
if (is.null(xlim)) {...
2018 Nov 08
0
An update on the vctrs package
Kia Ora
> vec_size(data.frame(x = 1:10))
> #> [1] 10
> vec_size(array(dim = c(10, 4, 1)))
> #> [1] 10
I think that "length" (in the R way) or "size" should incorporate the
number of columns (or other dimension information).
How about:
> vec_npoints (x)
> vec_nrecords (x)
> vec_nobs (x)
Depending on whether you want to promote geometry, databases or statistics.
I like npoints because I like to be Geometry-Friendly :).
This next issue isn't probably the feedback you're looking for.
However, given that you brought it up...
>...
2010 Jul 05
1
export VTK from R : impossible to write data as float
...vtk DataFile Version 3.0\n',file="vtk_header")
cat('R Binary Export v3.0 of inversion model\nBINARY\n',file="vtk_header",
append=TRUE)
cat('DATASET UNSTRUCTURED_GRID\n',file="vtk_header", append=TRUE)
#placed here instead of top of vtk_points, since npoints is not known before
cat('POINTS', 8,'int\n',file="vtk_header",append=TRUE)
#write points
writeBin(as.integer(c(0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1,
0, 1, 1, 1, 1, 1)),bfile_points,endian="swap")
#cells header
cat('\nCELLS', 1,9,'\n...
2012 Sep 03
2
adding points to a point pattern
Hello all:
Is there any way to add points to a point pattern, while keeping a given
minimum distance amongst this new points and the pre-existing points?
Thanks,
Frederico
[[alternative HTML version deleted]]
2011 May 17
3
gsub() issue...
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20110517/1812d6c6/attachment.pl>
2011 May 20
14
[Bug 37398] New: some applications (like wine) crash nouveau and leave it in an unworkable state
https://bugs.freedesktop.org/show_bug.cgi?id=37398
Summary: some applications (like wine) crash nouveau and leave
it in an unworkable state
Product: xorg
Version: unspecified
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: major
Priority: medium
Component:
2019 Oct 15
4
Splitting the large libguestfs repo
I got a little way into this. The two attached patches are
preliminary work.
My proposed split is:
libguestfs.git
common -> git submodule libguestfs-common.git
generator/
lib/
all language bindings
C based tools (eg. virt-df, virt-edit, guestfish)
guestfs-tools.git
common -> git submodule libguestfs-common.git