Displaying 20 results from an estimated 6000 matches similar to: "How to iteratively extract elements out of a list"
2006 Jun 01
4
A coding question
Dear List:
I have the follow code:
y <- replicate(10,replicate(8,sum(rnorm(rpois(1,5)))))
Now I need to apply the following condition to _every_ randomly generated
Normal number in the code above:
x - max(0,x-15) + max(0,x-90), where x represents the individual Normal
numbers.
In other words, the said condition needs to be applied before
replicate(...(replicate(...(sum(...))) takes place.
2007 Apr 26
3
A coding question involving variable assignments in ifelse()
Dear List,
Below is a simple, standard loss model that takes into account the
terms of an insurance policy:
deductible <- 15
coverage.limit <- 75
insurance.threshold <- deductible + coverage.limit
tmpf <- function() {
loss <- rlnorm(rpois(1, 3), 2, 5)
sum(ifelse(loss > insurance.threshold, loss - coverage.limit,
pmin(loss, deductible)))
}
net <- replicate(1000000, tmpf())
2006 Mar 17
3
Open .ssc .S ... files in R (PR#8690)
----- Quick summary:
In the File:Open dialog, please change
"S files (*.q)"
to
"S files (*.q, *.ssc, *.S)"
and show the corresponding files (including .SSC and .s files).
----- Background
This is motivated by the following query to R-help:
>Date: Thu, 16 Mar 2006 22:44:11 -0600
>From: "xpRt.wannabe" <xprt.wannabe at gmail.com>
>Subject: [R] Is
2006 Mar 17
2
Is there a way to view S-PLUS script files in R
Dear List,
I have some S-PLUS script files (.ssc). Does there exist an R
function/command that can read such files? I simply want to view the
code and practice in R to help me learn the subject matter.
Any help would be greatly appreciated.
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 2.1
year 2005
month 12
day 20
svn
2008 Dec 14
2
Help required to install package from a website
Hi,
I am new to R and I'm looking to perform some method comparison
analysis and would be grateful for some help regarding package
installation.
There is a package 'MethComp' that I want to use
(http://staff.pubhealth.ku.dk/~bxc/MethComp/Courses/Sthm.2007/.)
Unfortunately I am unable to install it. I have tried numerous
approaches but to no avail. this is the first time I have tried to
2006 Mar 03
1
How to show the intermediate tick marks without the values in a different color
Is there a way to show also the intermediate tick marks without the
values?
Example:
plot(cars)
What would one do to show the tick marks in, say, gray color at the
increment of 1 without showing the actual values in-between the default
x
values: 5, 10, 15, 20, 25?
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 2.1
year 2005
month
2007 Nov 25
1
Package Building under Windows with MikTeX 2.6
Dear WizaRds,
I wrote a small function in R and would like to create a package. The
necessary documentation is done, Rtools etc. are installed and I am
still unable to complete the process under Windows. I did extensive
research in the archives and read the Murdoch-Sutherland website on the
Rtools and MikTeX hints. I realize that I understand only half or less
of what is said there
2014 Feb 14
1
lda+ldap multiple users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, 14 Feb 2014, matthias lay wrote:
> On 02/14/2014 08:27 AM, Steffen Kaiser wrote:
>> On Fri, 7 Feb 2014, matthias lay wrote:
>>
>>> I experienced that if a Mailaddress matches several users the delivery is
>>> aborted.
>>>
>>> ----------------
>>> dovecot: auth: Error:
2005 Sep 16
1
Add lines to density plot
Dear List,
I am using R to learn bootstrapping concepts. Not to be oblivious to
the
contributed packages of boot and bootstrap, I have opted to do the
following as a way to hone my R skills.
One example I am trying to work through is the following:
x <- 1:20
Observed <- sample(x,20)
Resamples <- replicate(1000,sample(Observed,replace=TRUE))
Boot.Means <- apply(Resamples,2,mean)
2009 Jun 19
1
namespace? environment? how to manage functions?
Hi, useRs-
I have been building a set of functions over time and now my R_GlobalEnv
becomes
too crowded.
I would like to put all my functions under the same namespace/environment.
Ideally,
I would like to call them using "env::func" as in C++.
The following code almost do the jobs I want - except that I need to add
"env$"
before defining each function. I can't do
2008 Jul 03
1
Installation of packages via GUI, Mac OS X
All,
I'm running R v2.7.1 on Mac OS X. When I go to the R package installer GUI,
I am not prompted to select a repository. The usual screen is there but
the columns for package, installed version, and repository version are all
populated via blank entries.
If I select "Get List" the error below occurs. The same thing occurs if I
go form the command line via install.packages.
2005 Oct 18
1
A two-part question about box-percentile plots, bpplot(): (1) yaxt="n" doesn't seem to work (2) how to display mean values
Dear List,
I have a two-part question related to bpplot(), a box-percentile plot
function in the Hmisc package.
Take the example given in the Help for bpplot(), for instance.
(1) How does one set but not draw the y-axis? What I did was,
bpplot(... , yaxt="n"), but that apparently does not work (though it
works for boxplot()).
(2) How does one display the mean value of each variable
2009 May 20
4
Functions returning functions
Dear All:
I have a question regarding the behavior of functions.
Say I define a function that returns another function :
A <- function(parameters) {
# calculations w/ parameters returning 'y'
tmpf <- function(x) { # function of 'y' }
return(tmpf)
}
The value of the parameters are stored in an environment local to the
function. Then I call
x<- something
2019 Dec 03
2
Account locked and delayed user data propagation...
Mandi! Rowland penny via samba
In chel di` si favelave...
I came back on this, because still some glitches happen.
Yesterday I'm locked out.
'pdbedit -vL gaio' say me that account IS locked. But:
> yes, Provided you use the right attribute to search on ;-)
> Something like this will give you if/when the account was locked out:
> ldbsearch -H
2010 Mar 15
1
host cross-compile patch
I tend to use the same tool-chain across various hosts so I made this
very simple patch that allows you to pass the cross-compiler name to
make ( e.g. make CROSS_COMPILE=i686-nptl-linux-gnu-).
I'm not sure if patches should be attached or just pasted inline so I
did both this time. BTW, it's relative to syslinux 4 but the same
changes work with syslinux 3 although the patch won't
2010 Mar 30
1
update.packages() and install.packages() does not work more because of "Error in read.dcf"
Hi,
on all my systems update.packages() and install.packages() fails now. I
get the following message:
root at orca:/root(28)# R
R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or
2008 Mar 10
3
internet proxy settings (win)
I cannot access internet through R.
My IT-guys told me that I should set the proxy and the port and then
everything will be fine. Where can I set them?
I use R 2.6.2 under Windows 2000 and these settings are those of the
Internet Explorer (no password).
I read http://cran.at.r-project.org/bin/windows/base/rw-FAQ.html#The-Internet-download-functions-fail_002e
but staring R by
"C:\Program
2011 Aug 26
1
issue with available.packages() and download.file()
Dear R-Users,
I think I have encountered a potential bug (or at least unwanted behavior),
but I'm not sure so I wanted to post here first. Lately I've been
encountering an error when running a package I put together. I have my
package set up to check for updates when it loads but this error occurs and
stops the package from loading:
Error : .onLoad failed in loadNamespace() for
2009 Oct 23
3
opposite estimates from zeroinfl() and hurdle()
Dear all,
A question related to the following has been asked on R-help before, but
I could not find any answer to it. Input will be much appreciated.
I got an unexpected sign of the "slope" parameter associated with a
covariate (diam) using zeroinfl(). It led me to compare the estimates
given by zeroinfl() and hurdle():
The (significant) negative estimate here is surprising, given
2007 Aug 10
2
available.packages (PR#9841)
Full_Name: Zivan Karaman
Version: 2.5.1
OS: Windows XP SP2
Submission from: (NULL) (195.6.68.214)
I think that I have encountered a bug in the function "available.packages" when
using a local repository (file://
) on Windows.
Version information:
platform i386-pc-mingw32
arch i386
os mingw32
system