Displaying 20 results from an estimated 3000 matches similar to: "How do you exit a function in R?"
2008 Jul 21
1
y-axis number format on plot, barplot etc.
I am trying to change the number format shown on the y-axis from scientific
5e05, to 500,000 etc. Does anyone know how to do this?
Is there something I can add as an argument to barplot, or would it be
through par?
barplot(data$Value, names.arg = as.vector(data$Field), main=strTitle)
[[alternative HTML version deleted]]
2008 Sep 05
1
Using R to generate reports
Hi all,
I would like to generate nicely formatted reports on a daily basis. The
reports would be a combination of charts and tables, generated in an
environment such as R.
Ideally, this would be an automated process. Does anyone know if this is
feasible, and how I could achieve well formatted reports? One idea would be
to have R scripts process the data/generate the charts and then use
2009 Mar 17
2
Difficulty Replacing a Row of a Data Frame
I have the following data frames, avGain and retGain. They have the same
dimensions.
The following line of code replaces row j of avGain as desired:
avGain[j, ] <- mean( retGain[jStart:j, ] )
However, the following line does not work:
avGain[j, ] <- ( avGain[j-1, ] * ( DAYS - 1 ) + retGain[j, ] ) / DAYS
If I do the following, and test to see if a or b are data frames.
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl,
I'm using something like:
----------------------- tex.tex ---------------------------
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyvrb}
\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}}
\newcommand{\myinput}[1] {\begin{scriptsize}
\VerbatimInput[frame=single,label=#1]{#1}
\end{scriptsize}}
\title{The R logo,
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl,
I'm using something like:
----------------------- tex.tex ---------------------------
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyvrb}
\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}}
\newcommand{\myinput}[1] {\begin{scriptsize}
\VerbatimInput[frame=single,label=#1]{#1}
\end{scriptsize}}
\title{The R logo,
2007 Nov 26
3
Time Series Issues, Stationarity ..
Hello,
I am very new to R and Time Series. I need some help including R codes
about the following issues. I' ll really appreciate any number of
answers...
# I have a time series data composed of 24 values:
myinput = c(n1,n2...,n24);
# In order to make a forecasting a, I use the following codes
result1 = arima(ts(myinput),order = c(p,d,q),seasonal = list(order=c(P,D,Q)))
result2 =
2014 May 28
1
Ellipsis to Two Functions When One Has Nested Functions
Hello
If I have a function
aFunction <- function(data, alpha, ...)
{
transform(alpha, ...)
rowMeans(data) > alpha
}
f <- function(data, selection, ...)
{
selected <- selection(data, ...)
plot(data[selected, ], ...)
}
f(aDataset, aFunction, alpha = 10, pch = 19, transform = sqrt)
and selection calls another function, which has ... and that function calls other
2004 Mar 24
7
binding vectors or matrix using their names
Hello list,
I have two vectors x and x2:
x=runif(10)
x2=runif(10)
and one vectors with their names :
my.names=c("x","x2")
I would like to cbind these two vectors using their names contained in the
vector my.names.
I can create a string with comma
ncomma=paste(my.names,collapse=",")
and now, I just need a function to transform this string into a adequate
2002 May 13
3
Histograms rotated, side-by-side
Hi there,
I am wanting to create 8 side-by-side histograms which have been rotated 90
degrees clockwise from how they usually sit.. all with the same scales. Is
someone able to help me out?
Thanks so much,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2016 Sep 22
1
Centos doesn't load or work
I've tried Zorrin, Ubuntu and Centos.
Zorrin and Ubuntu work fine, but Centos doesn't load, or run.
I asked for advice, didn't get any and seem to have been added to all your Centos mailing lists.
Please remove me from your mailing lists.
Sincerely,
Bob Cunliffe
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2001 Aug 12
1
Creating a Model Matrix - keeping NAs
I am wanting to create a model matrix and keep the NAs.
stratmat <- model.matrix(myformula,mydata)
Is there any way to do this? model.matrix doesn't have na.action as a
parameter. Elsewhere I have made use of na.keep <- function(x){x}.
Many thanks,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2009 Jun 15
3
Assigning Data a name from within another variable?
Hi All,
I have hunted high and low and tried dozens of things but have yet to
achieve the result I require. Below is my code (taken mostly from another
thread on here) thus far:
files<-list.files()
files<-files[grep('.wm4', files)]
labels<-gsub('.wm4', '',files)
for(i in 1:length(files)){
X<-read.table(files[i])
<My problem is here!>
What I am trying
2012 Oct 03
0
[LLVMdev] [cfe-dev] Does LLVM optimize recursive call?
Hello David Chisnall, John McCall, David Blaikie and other people who
may concern
> If your teachers are really making this sort of superficial generalization,
> they're doing you a disservice.
This hit my head.
Actually I didn't test the performance of those two, the iteration and
the recursion, at all. And in this field of study, testing is very
much important, I believe.
And
2012 Oct 03
2
[LLVMdev] [cfe-dev] Does LLVM optimize recursive call?
On 3 Oct 2012, at 09:48, John McCall wrote:
> If your teachers are really making this sort of superficial generalization,
> they're doing you a disservice.
I completely agree with John here - we had a case a few years ago where someone spent ages refactoring their algorithm to be iterative and was surprised that it became slower (with the MS compiler). Looking at the assembly, it was
2001 Aug 09
2
Pulling columns out of a data.frame
Hi there
Probably a very simple solution to this problem.
I have a character vector eg c("name1","name2","name3") and I want to pull
out these columns from a data.frame, converting each of these columns into
factors also.
Many thanks
Rachel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2016 Sep 19
3
llvm interpreter does not find function defined by addGlobalMapping
Hi,
I want to use a function defined in c(++)-code from code generated by llvm. For this I use ExecutionEngine.addGlobalMapping(). I started with the JIT execution engine and everything worked, then I switched to the interpreter engine and it stopped working, but only if compiled on a Linux system. More precisely it works if I use
llvm 3.8.1 + gcc (Linux) + JIT
llvm 3.8.0 + mingw-gcc
2008 Jun 21
1
passing arguments to a function problem
Dear R-users,
is there some way how to pass various colnames to the following code for
sorting data.frames?
mydf.ordered<-with(mydf, mydf[order(colname1,colname2, colnameX, decreasing
= TRUE), ])
I was trying something like
Afunction<-function (mydf,colnames,decreasing=T){
mydf.ordered<-with(mydf, mydf[order(colnames, decreasing = decreasing),
])
}
but it didnt work
please
2001 Feb 28
1
windows() options
Hi
Just noticed that the windows() function doesn't seem to allow for decimals
in the width and height options. For example, typing:
> windows(5,4,10)
> windows(5.2,4,10)
> windows(5.4,4.3,10)
produces three equally sized windows. Is there a way to get around this and
create more accurately sized windows without having to resize by hand?
Thanks
Rachel Cunliffe
Department of
2005 Sep 21
2
Result Documents XML or JSON?
My Java servlets can generate both JavaScript objects, like
JSON, and XML. I can generate both pretty easily.
What''s best practice for AJAX responses? Return scripts to be
evaled by the Ajax control, or return XML documents and iterate
them using XML DOM?
Thanks.
--
Alan Gutierrez - alan@engrm.com
- http://engrm.com/blogometer/index.html
-
2011 Jan 14
6
Plexus UPS on a QNAP NAS
Hi,
Has anyone managed to get a Plexus UPS talking to their NAS. I've followed
the excellent instructions here http://forum.qnap.com/viewtopic.php?f=182
<http://forum.qnap.com/viewtopic.php?f=182&t=35970&start=0> &t=35970&start=0
but I'm not there yet.
When I manually start upsdrvctl without the UPS plugged in I get
[~] # /usr/bin/upsdrvctl start
Network UPS