Displaying 20 results from an estimated 10000 matches similar to: "applying a function over an array"
2005 May 27
4
plotting box plots on same x
I am trying to construct a graph of 6 box plots of blood pressures. I
want them to be on a single set of axis and I want the SBP to be ontop
of the DBP. I have an array bp with the data in it and I tried
a[1,]<-c(145,60,147,62,140,57)
a[2,]<-c(160,75,160,74,160,70)
a[3,]<-c(140,55,140,65,142,55)
boxplot(data.frame(a), main = "Blood Pressures", at=c(1,1,2,2,3,3),
2005 May 25
3
Any ideas on how to add a dotted line to a box plot to indicate a specific value?
Basically, i want to create a boxplot from population data, with a solid
line for the median, and then a dotted line for a specific persons
value. Is there a way to artificially introduce another line or mark of
some kind in a box plot? Thanks again for all of yoru help. Hopefully
soon I wont have to keep bugging you all. ~Erithid :-p
2005 May 27
2
I never made any assumption athat anyone had any obligation to do anything
I just asked a question. If I was too vague, then i am sorry. I dont
expect anyone to help me, but I thought that it was ok to put the
question out there in case someone wanted to help me. I didnt expect
abject hostility for it. Human decency was the only thing I did expect.
If my question was a pain,badly formatted, or too juvinile, then i have
no problem being ignored.I asked a question
2007 Oct 09
5
continue for loop in case of erros
Dear all,
I have a for loop which includes nls model estimation.
The loop breaks after the first non-convergence error.
How can I make the loop continue and try to estimate all models?
I suppose it should be sth like: if(...) { next }
but I have no idea how to setup the arguements...
Thank you!
Irene
2008 Oct 29
2
Help using tapply with multiple variables
Dear list,
I have the function (as a simple example, which is actually part of a
larger function)
pres.test<-function(N0=N0, N1=N1)
{
dt<-5
r<-log(N1/N0)/dt
r
}
which calculates the annual growth rates in a population
Where N0 is the population classified into age intervals, say 5
years, at time=1995, and N1 is the population by 5 year age classes
at time=2000.
2008 Jan 02
2
[LLVMdev] immediate predecessors
hi,
how to get the number of immediate predecessors for
each basic block (arguements of remarks statement at
the beginning of the basic block)
thank you
aditya
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
2009 Aug 14
1
Saving Iterative Components
Dear All,
I am trying to iterate an iterative process (i know R is not the best place
for so much looping but i have to so tough!) and store the resulting data
from each iteration to then be graphed. In simple form the script looks like
this
for(i in tracks)
{
a <- (subset(data, data$Id==i))
result.dataset <- function(a, other.arguements)
### this function is the other
2011 Jan 14
2
question about deparse(substitute(...))
Dear R helpers:
I like to apply deparse(substitute()) on multiple arguments to collect the
names of the arguments into a character vector.
I used function test.fun as below. it works when there is only one input
argument. but it does not work for multiple arguements. can someone kindly
help?
test.fun <- function(...){deparse(substitute(...))}
test.fun(x) #this works
test.fun(x,y,z) # I like
2008 Mar 17
5
DRBD question.
I'm going to have to be a little vague on this one, but hope I provide
enough to make the question clear. I'm not doing the work on this
server, a co-worker is, but I said I would ask for him.
He is trying to get DRBD installed. He's using Centos 5.1 and the yum
repos, but is getting problems with things like the kernel, drbd.so, and
the likes. All install fine, but I'm not
2010 Dec 15
3
Applying function to a TABLE and also "apply, tapply, sapply etc"
Dear R-help forum members,
Suppose I have a data-frame having two variables and single data for each of them, as described below.
variable_1 variable_2
10 20
I have written a function, say, 'fun' which uses input 10 and 20 and gives me desired result.
fun = function(X, Y)
{
X + Y #( I am just giving an example of
1997 Aug 15
2
R-beta: Polynomials in lm/glm
R users,
I was a bit surprised to find that when I attempted to add a polynomial
term to a linear model using either lm or glm as could be done in S
resulted in a fit without that term included and without warning(!!), e.g.
> lm(response ~ x + x^2, data).
As far as I can gather, there is no poly() yet in R, and if lm/glm do not
allow functions of variables as their formula arguements, is
2003 Nov 07
1
diax request
First of all great job on diax. I downloaded it and tried it, could not
connect, got an authentication rejected,but I have not had a chance to
figure out why yet - tried with a working gnophone setup in the
configuration files.
Is there any way to pass command line arguements to the program ? Where I
see a real niche for a lightweight softphone is being able to serve the
thing from a
2006 Aug 21
1
"vcov" error in svyby and svytable functions
Hi,
I'm trying to compute survey svytable statistic on subsets by using the
svyby function.
Here is the code:
b<-svyby(~V024+V751, by=~V025, design=strat2, svytable, round=TRUE)
The vars, V024, V751 and V025 are factors. The by var has 2 levels, and
hence there will be two subsets. strat2 is created by the svydesign function.
It's giving me the following error:
>
2012 Sep 20
1
question on assigning an argument in a function that is create by the function itself
Hi,
I need some help with making a function a bit more elegant. How would you
all suggest avoiding the problem I've made myself below - I've written a
function that creates a temporary matrix by subseting a larger one I assign
it. I then call vectors from that matrix, add each item in the vector to
create a cumulative vector for each factor, and then patch them all back
together.
2003 Jun 26
1
T1 or T1PRI? which sould i use?
Hi
i'm using asterisk in a pre-paid calling card like system
and have a few questions.
1) Should i use Voice T1's or PRI. Please give arguements
for and against.
2) is there any already configured * scripts for making
calling card calls? are they GPL or Commercial?
3) if they are GPL where can i get my hands on them.
4) is there any work on intergrating openDSP libraries into
*? found
2005 Mar 30
2
Centos 4.0 and Named
I am failing to get Named started.
I copied my named.custom and zone files to a diskette from my 3.3 build.
I installed 4.0 from scratch and did the updates.
I edited /etc/named.conf (which I realize is a link) to include named.custom
I cp named.custom into /etc (all of this was done while logged in as root)
When I try to start named from the services GUI (using GNOME) and I get
this error:
2002 Mar 28
3
how to run .r batch file
I am completely new to R, but have some bg in cs and stat.
since R has an interactive programming environment, I thought I could write my command in a file and run it in batch mode in the Rgui. but it didnt work. I checked the doc. it said Rcmd BATCH inputfile. it didnt work either.
Can someone help? thank you. thank you.
also if you can shed some light on passing command line arguements (like
2004 Sep 13
6
Migrate BACK to WINDOWS -> Talk me out of it QUICK
Not thinking about migrating back due to issues, it is more due to
implementation needs and a little situation I have been wrestling with
with for a bit now, and would love some feedback
First a little history:
We currently have 10 locations connected via a dedicated 1/2 T-1.
Last year I migrated from a WINNT domain to a Samba/LDAP domain. It
has been running great. Basically did this for
2006 Feb 01
1
Help with functions
Dear R-users
I intend to create a function which calls some smaller other functions in return. Some of these smaller functions all call some functions. I do not know a good way to do this. I tried using the source() function to include the smaller functions within the main functions before they are called. This does not work, or maybe i am not doing the right thing.
For example:
the
2002 Oct 24
1
Rjava failing to initialize in Windows 2000
Dear Any,
I am trying to initialise Rjava with the objective of running ORCA within R.
I am running R1.5.1 on Windows2000 and get the same problem with Sun
Java run time jre-1.2.2_013
Java j2re-1.4.1_01
Microsoft Java Virtual Machine Build 3805
.JavaInit() is failing at :
.C("s_start_VM", as.character(classPath), as.character(classPath),