Displaying 20 results from an estimated 900 matches similar to: "A sapply() funny."
2003 Oct 28
1
'levelplot' with an option 'at'
Hi all,
I encountered a difference between versions 1.6.1 and 1.7.0 when using
levelplot with an option 'at'. Here are the specs of the two platforms
used:
> R.version
_
platform sparc-sun-solaris2.8
arch sparc
os solaris2.8
system sparc, solaris2.8
status
major 1
minor 6.1
year 2002
month 11
day 01
language R
> R.version
_
platform
2003 Mar 05
8
how to find the location of the first TRUE of a logical vector
without having to check the vector element by element? Thanks a lot!
Jason
=====
Jason G. Liao, Ph.D.
Division of Biometrics
University of Medicine and Dentistry of New Jersey
335 George Street, Suite 2200
New Brunswick, NJ 08903-2688
phone (732) 235-8611, fax (732) 235-9777
http://www.geocities.com/jg_liao
2006 Nov 24
2
low-variance warning in lmer
For block effects with small variance, lmer will sometimes
estimate the variance as being very close to zero and issue
a warning. I don't have a problem with this -- I've explored
things a bit with some simulations (see below) and conclude that
this is probably inevitable when trying to incorporate
random effects with not very much data (the means and medians
of estimates are plausibly
2004 Feb 16
1
2 bwplots - different colors
Hi all,
I would like to draw one picture which would show two different types of
boxplots using the same axes (kind of on top of each other). However, I
would like to plot each boxplot using a different color or different
shading inside the box, so they could be better distinquished from each
other... Could you help me?
Here is an example of the plot I have so far. I was only able to change
the
2003 Apr 04
3
trellis.graphic in for-loop
Hi list,
I am unsuccessfully trying to produce a serious of trellis barcharts from
within a for-loop. The barcharts work outside the loop. What am I missing?
Example attached.
Thanks Herry
#XXXXXXXXXXXXXXXXXXXXXX
trellis.device(bg="white")
trellis.par.get("fontsize")->fontsize
fontsize$default<-16
trellis.par.set("fontsize",fontsize)
2003 Nov 08
1
notation for skewness and kurtosis
Hello everybody,
this is a bit off topic, so maybe you can just reply to me personally...
What is the typical notation for 'skewness', 'kurtosis' and maybe 'excess
kurtosis'?
Thank you,
Martina
--------------------------------------------------------------------------
Department of Statistics Office Phone: (614) 292-1567
1958 Neil Avenue, 304E Cockins Hall
2001 Jun 01
1
Installing Rstreams lib
Dear R-helpers,
I am trying to install Rstreams library on the following platform:
----------------------------
platform alphaev67-dec-osf5.0
arch alphaev67
os osf5.0
system alphaev67, osf5.0
status
major 1
minor 2.3
year 2001
month 04
day 26
language R
---------------------------
Unfortunately, I get these error messages:
---------------------------
> [557] R
2005 Apr 29
0
handling of zero and negative indices in src/main/subscript.c:mat2indsub() (PR#7824)
This message contains a description of what looks like a bug, examples
of the suspect behavior, a proposed change to the C code to change this
behavior, example of behavior with the fix, and suggestions for 3 places
to update the documentation to reflect the proposed behavior. It is
submitted for consideration for inclusion in R. Comments are requested.
Currently, the code for subscripting
2005 May 06
0
(PR#7824) handling of zero and negative indices in
I've put this in (with some different wording). Although S blithely
accepts mis-dimensioned index matrices I agree this is wrong and have made
it an error.
On Fri, 29 Apr 2005 tplate@acm.org wrote:
> This message contains a description of what looks like a bug, examples
> of the suspect behavior, a proposed change to the C code to change this
> behavior, example of behavior with
2008 Mar 21
1
(no subject)
Hi, I am fairly new to R, and am stuck.
I want to write an R function with argument n that returns a vector of length n with n simulated observations from the double exponential distribution with density: ??g(y) = 1/2e^-y
?
For the double exponential, I want to generate y~Exp(1) and then take ?y with probability 0.5
?
Does anyone know how I can do this in R?
Thanks!
Fran
[[alternative
2011 Jul 02
1
Simulating inhomogeneous Poisson process without loop
Dear all
I want to simulate a stochastic jump variance process where N is Bernoulli
with intensity lambda0 + lambda1*Vt. lambda0 is constant and lambda1 can be
interpreted as a regression coefficient on the current variance level Vt. J
is a scaling factor
How can I rewrite this avoiding the loop structure which is very
time-consuming for long simulations?
for (i in 1:N){
...
N <- rbinom(n=1,
2006 Apr 21
1
Linker problem in installing 64-bit R
Hi,
I am trying to compile R-2.2.1 on Solaris 2.9 with a 64-bit build. Following
the instructions in "R Installation and Adminstration", I changed the
following settings in "config.site":
CC="gcc -m64"
F77="g77 -64"
CXX="g++ -m64"
LDFLAGS="-L/usr/local/lib/sparcv9 -L/usr/local/lib"
But I got the following error messages:
2005 Apr 19
0
R 2.0.1 install problem on Solaris 9
Sorry about the earlier confusion. I'll start fresh here.
I'm getting these error messages when I run "make".
begin installing recommended package foreign
make[2]: *** [foreign.ts] Error 1
make[2]: Leaving directory
`/opt/net/source/R-2.0.1/src/library/Recommended'
make[1]: *** [recommended-packages] Error 2
make[1]: Leaving directory
2002 Sep 10
2
Readline problem.
This question relates, at least vaguely, to recent postings
from me concerning my attempts to build R-1.5.1 under Solaris 2.7.
I've more or less given up on this, and I and a colleague are
attempting to build R-1.5.1 on another machine in our Department,
and are getting a ***different*** problem.
Version details:
platform sparc-sun-solaris2.9
arch sparc
os solaris2.9
2002 Sep 10
2
Readline problem.
This question relates, at least vaguely, to recent postings
from me concerning my attempts to build R-1.5.1 under Solaris 2.7.
I've more or less given up on this, and I and a colleague are
attempting to build R-1.5.1 on another machine in our Department,
and are getting a ***different*** problem.
Version details:
platform sparc-sun-solaris2.9
arch sparc
os solaris2.9
2004 Nov 16
1
lme, two random effects, poisson distribution
Hello,
I have a dataset concerning slugs. For each slug, the number of
pumps per one time slot was counted. The number of pumps follows
Bi(30, p) where p is very small, thus could be approximated by
Poisson dist. (# of pumps is very often = 0)
The slugs were observed during 12 time slots which are correlated in
time as AR(1). The time slots are divided into two categories:
Resting time
2005 Jan 26
2
Source code for "extractAIC"?
Dear R users:
I am looking for the source code for the R function extractAIC. Type the
function name doesn't help:
> extractAIC
function (fit, scale, k = 2, ...)
UseMethod("extractAIC")
<environment: namespace:stats>
And when I search it in the R source code, the best I can find is in (R
source root)/library/stats/R/add.R:
extractAIC <- function(fit, scale, k = 2,
2005 Feb 23
1
Graphics devices file[name] argument
Just got trapped by inconsistency of name of first argument
for file-based graphics devices. Both 'file' and 'filename'
are currently in use depending on the device. I ran on a
machine without PNG support which my code used postscript
as the backup device and choked here.
> do.call(device, list(filename = pathname,
height = height,
2005 Dec 08
1
Loading namespaces
I'm creating a package for my own use that uses some S4 classes but no
methods.
I have a file called NAMESPACE it contains the line:
exportClasses("foo")
and at the top of the R file I have
setClass("foo", representation(x="numeric")
and the line:
.onLoad<-function(libname,pkgname)
When I run R CMD check I get Syntax error in the only R file. If I
2004 Oct 28
2
Weighted regresion using lm
Hi:
Could anyone help me to clarify this: are the weights normalized inside lm
function (package:stats) before applied to the error term? For example:
>lm (cost ~ material, weights=quatity, data=receipt)
will lm normalize quatity such that sum(quatity) = 1? I traced to lm.wfit and
then the weights get transferred into a precompiled FORTRAN module so I can't
figure out. Thanks!