Displaying 20 results from an estimated 120 matches similar to: "Trabajar con un argumento opcional como escalar o vector."
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) +
2014 May 29
3
[LLVMdev] Proposal: "load linked" and "store conditional" atomic instructions
Hi Philip,
On 29 May 2014 17:03, Philip Reames <listmail at philipreames.com> wrote:
> I have some reservations about this proposal. I don't have anything
> particularly concrete, but the idea of supporting both LL/SC and atomicrwm
> in the IR concerns me from a complexity perspective.
Well, I'll start by saying my particular optimisation use case looks
like it's not
2004 Mar 19
0
How to do a truncated regression
Hi,
I'm interested in performing a regression of dependent variable y on
independent variable x, where (x,y) are known only for y < c, where c
is
a constant. For y >= c, neither x or y are known. This is called a
truncated regression, I believe.
I read a post on the R help list, that recommended doing the
following:
"The form for the response is Surv(c,y,1), but it
2010 Nov 11
3
Evaluation puzzle
The survexp function can fail when called from another function. The "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,
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
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
2010 Jul 05
1
export VTK from R : impossible to write data as float
Hello,
I've written a short code (below) to write 3D unstructured grid to binary
VTK files from R. Problem : I can only write integers with the command :
data<-as.numeric(c(3.3))
storage.mode(data)<-'integer'
writeBin(data,bfile_celldata,endian="swap")
the function storage.mode(data)<-'long' looks fine, but the VTK file is not
readable.
thanks for any
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
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
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
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]]
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 30 turnpoints?
Second question: the extract function
2014 May 29
4
[LLVMdev] Proposal: "load linked" and "store conditional" atomic instructions
Hi,
I've been looking at improving atomicrmw & cmpxchg code more,
particularly on architectures using the load-linked/store-conditional
model.
The summary is that current expansion for cmpxchg seems to happen too
late for LLVM to make meaningful use of the opportunities it provides.
I'd like to move it earlier and express it in terms of a first-class
pair of "load linked"
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
###Dear R users
###I have been using SensoMineR package from CRAN for most of my work in
sensory data analysis and from my usage experience, I encountered some
areas for improvement and considered ###modifying the function in
SensoMineR package for my personal use. I felt that it could be useful to
share this to the community for enabling adoption by other users where
they might require a
2013 Dec 13
0
Cambiar opciones knitr en documento latex
Hola, estoy usando knitr en un documento latex, pero me gustaría
aumentar el tamaño de la fuente del "output" (creo que por defecto usa
"normalsize"). Alguien puede decirme como cambiar esta opción.
Muchas
gracias.
Manuel
[[alternative HTML version deleted]]
2013 Dec 13
0
Cambiar opciones knitr en documento latex
Muchas gracias Daniel. Era eso lo que buscaba.
El 13/12/2013
14:18, daniel escribió:
> Manuel,
> Los cambios los puedes hacer
desde el chunk
> << size = 'LARGE' >>
> o lo puedes hacer para todos
los chunk cambiando las opciones de éstos dentro de un chunk de código
> opts_chunk$set(comment=NA, fig.width=6, fig.height=6, size='Large')),
> No
2012 Jul 24
1
Acceso a la opcion demo()
He tratado de usar la opcion demo() en R studio:
> require("AER")
Loading required package: AER
Loading required package: Formula
Loading required package: lmtest
Loading required package: zoo
Attaching package: ''zoo''
The following object(s) are masked from ''package:base'':
as.Date, as.Date.numeric
Loading required package: sandwich
Loading
2013 Jun 14
2
Argumento "Puntos suspensivos"
Hola a tod en s:
Tengo una función del tipo
f <- function(...) {
args <- list(...)
# validaciones
}
En la cual debo realizar una validación diferente para cada argumento que se pase, y no consigo identificar los nombres de los argumentos con names(args).
¿Alguna idea o sugerencia acerca de cómo realizar este tipo de validaciones?.
Gracias.
Salud!
Eva
2013 Jun 14
0
Argumento "Puntos suspensivos"
Hola de nuevo:
Os reenvío mail. Creo que en el anterio hubo un problema de codificación de caracteres.
Saludos!
________________________________
Para: Lista R <R-help-es@r-project.org>
Enviado: Viernes 14 de junio de 2013 23:00
Asunto: Argumento "Puntos suspensivos"
Hola a tod@s:
Tengo una función del tipo
f <- function(...) {
args <- list(...)
#
2015 Jul 06
2
Pasar un listado de variables como argumento de una función
Hola:
Quiero que una función realice una serie de cálculos pero eliminando las variables que no interesan (diferentes según e fichero a analizar). Intento pasar esta lista como argumento con un c("VAR1", "VAR2", etc), pero no lo consigo. Un ejemplo seria:
DATOS <- data.frame(SE=c("M", "H", "M", "M", "H"),