Displaying 20 results from an estimated 8000 matches similar to: "First R package, advice"
2013 Feb 06
5
First R Package --- Advice?
Dear R experts---
after many years, I am planning to give in and write my first R
package. I want to combine my collection of collected useful utility
routines.
as my guide, I am planning to use Friedrich Leisch's "Creating R
Packages: A Tutorial" from Sep 2009. Is there a newer or better
tutorial? this one is 4 years old.
I also plan on one change---given that the
2007 Jun 20
1
Help With Sweave:
Hi All,
I am running Ubuntu Feisty (7.04) on a Thinkpad T41. I've installed
the nowebm package for Ubuntu. Working from this HowTo:
http://www.ci.tuwien.ac.at/~leisch/Sweave/example-1.Snw
I try to compile the example *.Snw as in the Sweave manual:
mdj at lapmdj:~/Desktop/Sweave/example1$ noweb example-1.Snw
Can't open output file
Despite the error, a *.tex file is produced. Now I am
2007 Jul 24
1
function optimization: reducing the computing time
Dear useRs,
I have written a function that implements a Bayesian method to
compare a patient's score on two tasks with that of a small control
group, as described in Crawford, J. and Garthwaite, P. (2007).
Comparison of a single case to a control or normative sample in
neuropsychology: Development of a bayesian approach. Cognitive
Neuropsychology, 24(4):343?372.
The function (see
2010 Oct 05
3
SweaveInput + keep.source = TRUE trouble
Dear all,
I have trouble with R-beta sweaving files that include definitions with
\SweaveInput in combination with keep.source = TRUE
Symptom:
SInput is taken from too far down the input file (the shift is the number of
lines of the included file). Is that known? Searching didn't turn up anything,
yet I think there are more people than just me using keep.source.
Example:
$
2011 Jul 02
1
Speed Advice for R --- avoid data frames
This email is intended for R users that are not that familiar with R
internals and are searching google about how to speed up R.
Despite common misperception, R is not slow when it comes to iterative
access. R is fast when it comes to matrices. R is very slow when it
comes to iterative access into data frames. Such access occurs when a
user uses "data$varname[index]", which is a very
2003 Nov 13
1
Can't get Sweave syntax highlighting with Emacs
I can't get Emacs to automatically do syntax highlighting of
Sweave files. I have followed Friedrich's suggestion for code
to insert into my .emacs file. The complete section from my .emacs
file is given below. When I load a *.Snw file, font is white until I press
M-x, then the first code and document chunks get highlighted, but not
the rest of the file. Latex and Noweb menus are
2010 Dec 11
2
remove quotes from the paste output
Hi,
I'm generating the name of the variable with paste function and then using that
variable name further to get the specific position value from the data.frame,
here is the snippet from my code:
modelResults <- extractModelParameters("C:/PilotStudy/Mplus_Input/Test",
recursive=TRUE)
#extractModelParameters reads all the output files from the Test folder and
create the
2006 Aug 07
2
Backquote in R syntax
Hi Folks,
Can someone satisfy my curiosity (well, at least about
the following query!)
Reading the draft proofs of an article I've been asked
to look through, I find the typesetter has set what
would normally be entered as
source("xyz.R") or source('xyz.R')
as
source(`xyz.R')
i.e. it has come out with an opening backquote, then
xyz.R, then a closing forward
2003 Apr 23
1
Setting up Xemacs + Sweave
Dear list,
I have tried to setup my Xemacs for use with Sweave, which I indend to learn.
I have followed the instructions in the Sweave FAQ, that is to say, I put
(defun Rnw-mode ()
(require 'ess-noweb)
(noweb-mode)
(if (fboundp 'R-mode)
(setq noweb-default-code-mode 'R-mode)))
(add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode))
(add-to-list
2002 Nov 05
0
summary: Sweave - documenting a long function
Hi,
Here is a summary of the replies to my question yesterday
about documenting a long function with Sweave.
My thanks to those who replied.
Friedrich Leisch suggested a work around
which was copied to the mailing list
so I wont repeat it here. This worked well.
(I made a minor addition by adding braces
around each chunk of code to make the
output in the pdf file look a bit prettier.
This seems
2012 Jan 24
1
Sweave driver extension
Almost all of the coxme package and an increasing amount of the survival
package are now written in noweb, i.e., .Rnw files. It would be nice to
process these using the Sweave function + a special driver, which I can
do using a modified version of Sweave. The primary change is to allow
the following type of construction
<<coxme>>
coxme <- function(formula, data, subset, blah blah
2004 Feb 26
2
Sweave and Xemacs on Windows2000?
Hallo!
Trying to configure Xemacs to work with .snw files on windows 2000. Tried to do it how it is described in the FAQ for Sweaves.
When starting xemacs with and Snw file
*ESS* buffer contains hundrets of lines and the few last ones.
(ess-loop-timeout . 500000) (inferior-ess-primary-prompt . ^) (inferior-ess-secondary-prompt . ^) (comint-use-prompt-regexp-instead-of-fields . t)
2004 Jul 05
1
Apparent conflict between \Sexpr in Sweave and R2HTML
I have come across an apparent bug in the operation of Sweave. If I
load the package R2HTML then execution of \Sexpr{} in an *.Rnw file no
longer works. The \Sexpr{} code is simply written to the *.tex file.
Below are my *.Rnw file, commands, and output.
The Sweave file, Sweave-test-1_short.Rnw:
% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
\documentclass{article}
\title{A Test
2007 Feb 07
1
enhanced question / standardized coefficients
Hello,
I would like to repost the question of Joerg:
Hello everybody,
a question that connect to the question of Frederik Karlsons about 'how
to stand. betas'
With the stand. betas i can compare the influence of the different
explaning variables. What do i with the betas of factors? I can't use
the solution of JohnFox, because there is no sd of an factor. How can i
2009 Aug 24
0
CRAN and noweb
his is a query for suggestions on how best to setup the package for
coxme. This should be ready for CRAN in about a week - I'm working out
documentation details and some last test cases.
The R CMD check and INSTALL processes work great on my computer. The
rub is that they depend on noweb. Both algorithmicly and statistically
this is the most complex bit of code I have done, and after some
2002 Jul 17
1
editing Sweave files in xemacs with ess (noweb), auctex and reftex
I am having some trouble getting reftex, in particular the bibtex
related features, to work properly in xemacs when editing text in Sweave
files. I have added
(defun Rnw-mode ()
(noweb-mode)
(if (fboundp 'R-mode)
(setq noweb-default-code-mode 'R-mode)))
(add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode))
(add-to-list 'auto-mode-alist
2003 Feb 10
0
calling sweave function from LaTex re directories, formatting
System info:
Mandrake 9.0
R Version 1.6.1
ESS 5.1.21
Emacs 21.2.1
-------------------
Colleagues
I have followed suggestions by David Whiting, Friedrich Leisch and Frank
Harrell, but have a few more queries.
1. On formatting:
I added the suggested sweave customization to my .emacs file
; Sweave customisation
(defun Rnw-mode ()
(require 'ess-noweb)
(noweb-mode)
(if (fboundp
2012 Nov 29
2
Confidence intervals for estimates of all independent variables in WLS regression
I would like to obtain Confidence Intervals for the estimates
(unstandardized beta weights) of each predictor in a WLS regression:
m1 = lm(x~ x1+x2+x3, weights=W, data=D)
SPSS offers that output by default, and I am not able to find a way to do
this in R. I read through predict.lm, but I do not find a way to get the
CIs for multiple independent variables.
Thank you
Torvon
[[alternative HTML
2023 Nov 29
1
Code editor for writing R code
Presumably there's nothing stopping you *writing* LaTeX in comments
-- do you want a code editor that will render and display the LaTeX as
you write? (Or am I misunderstanding something?)
Does anyone do classic literate programming *sensu* Knuth any more?
https://rpubs.com/bbolker/3153
https://cran.r-project.org/web/packages/noweb/vignettes/noweb.pdf
On 2023-11-29 10:57 a.m.,
2009 Jan 19
1
Sweave encoding problem
Hello,
Sweave seems to have trouble processing german letters in R.
For example, my noweb R-input looks like this.
<<>>=
Oberfl?chenfehler = c(4, 11, 6, 2, 7, 9)
@
If I send it through Sweave, I get the following error message.
error: chunk 1
Error in parse(text = chunk) : unexpected input in "Oberfl??"
extra: Warning message:
In readLines(f[1]) :
underfull last line in