Displaying 20 results from an estimated 4000 matches similar to: "programming conventions"
2009 Jul 20
1
Naming Conventions
Hi,
I was wondering about naming conventions for functions in R. I wasn't able
to find anything official, just this document, which seemed reasonable but
you never know with things found on the internet:
http://www1.maths.lth.se/help/R/RCC/
When submitting packages to CRAN, is there a commonly accepted way (specific
to R) for naming functions? Thanks!
--
View this message in context:
2008 Feb 11
4
R programming style
I am aware of one (unofficial) guide to style for R programming:
http://www1.maths.lth.se/help/R/RCC/
from Henrik Bengtsson.
Can anyone provide further pointers to good style?
Views on Bengtsson's ideas would interest me as well.
David Scott
_________________________________________________________________
David Scott Department of Statistics, Tamaki Campus
The University of Auckland,
2012 Jun 07
2
¿Reglas de estilo para código en R?
Hola:
Me suena algo de que el año pasado alguien dijo algo sobre unas
sugerencias de reglas de estilo para escribir código en R.
No he oído nada más en esta lista (a lo mejor se me ha pasado por alto)
Ayer se publicó un mensaje sobre esto precisamente en un blog en inglés:
http://pairach.com/2012/06/06/r-style-guide/ (copiado debajo para
facilitar la lectura y comentarios en esta lista)
2005 May 17
2
cumsum on chron objects
Hi,
Is there some alternative to cumsum for chron objects? I have data frames
that contain some chron objects that look like this:
DateTime
13/10/03 12:30:35
NA
NA
NA
15/10/03 16:30:05
NA
NA
...
and I've been trying to replace the NA's so that a date/time sequence is
created starting with the preceding available value. Because the number of
rows with NA's following each available
2005 Apr 07
2
newline in lattice axis label
Hi,
I have a 3 panel xyplot with different variables in the y axis. I'm trying
to insert a newline after "Width (cm)," in the ylab argument as in the
example below. My goal is to have the y axis label broken into two lines,
split after the string just mentioned.
plotfun <- function() {
fakedf <- data.frame(A = sample(1:100, 50),
B = rnorm(50),
2005 Feb 23
1
MS Access, Endnote, among others
Hello,
Has anybody been able to successfully install MS Office XP Pro in Wine? I
don't care much about the whole suite, I need MS Access, but since I have
a bundled cd, I don't have much choice. Apparently several folks have had
similar problems in this list, and I haven't found solutions. Wine-version
is 0.0.20041201-1 Debian unstable package.
I'm not sure I'm starting the
2005 Mar 23
2
alternative to 'groups' for lattice bwplot()
Hi,
Is there some alternative to the 'groups' argument in lattice's bwplot
function for boxplots? Say in the example below:
bwplot(yield ~ site | year, data = barley)
you want to have two side by side boxplots per site, corresponding to each
year in the barley data frame. Ideally, the space between boxplots of the
same site should be smaller than that between boxplots of different
2005 Nov 30
3
setting R_LIBS
Hello,
I'm adding a private library tree in my home directory by adding this to
my ~/.Renviron:
R_LIBS="~/R/library:${R_LIBS}"
so that once in R:
R> cat(Sys.getenv("R_LIBS"), "\n")
~/R/library:/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library
Is this the best way to proceed?
Cheers,
--
Sebastian P. Luque
2006 Jul 14
2
chron vs. POSIX
Hi,
One of the big decisions when writing code is how to handle dates and
times. Gabor Grothendieck provided an excellent overview of the issue in
his R News 4/1 (2004) article, and many users and developers are probably
using it as a guide. The proposed guideline is to use the simplest class
required; as Gabor put it "use Date if possible, otherwise use chron, and
otherwise use
2004 Feb 17
10
How to write efficient R code
I have been lurking in this list a while and searching in the archives to
find out how one learns to write fast R code. One solution seems to be to
write part of the code not in R but in C. However after finding a benchmark
article (http://www.sciviews.org/other/benchmark.htm) I have been more
interested in making the R code itself more efficient. I would like to find
more info about this. I have
2005 Feb 22
6
rodbc or unixodbc error
Hi,
I'm trying to establish a connection to a MySQL database, and am using the
rodbc package for it. This is in a GNU/Debian Linux box, with the
corresponding Debian unstable packages. I can login to my MySQL databases
from any shell and directory, so the problem is probably not there. Here's
an example of what I'm doing:
R> odbcConnect("test",
2023 Jul 28
1
check_account: Failed to find local account with UID" issue / The university of Chicago
On Fri, 2023-07-28 at 19:55 +0000, Himanshi Yadav via samba wrote:
> Jul 28 09:18:51 midway3-dm1.rcc.local winbindd[1056745]:??? #15 /lib64/libtevent.so.0(tevent_common_loop_immediate+0x27) [0x7fbf521f6ca7]
> Jul 28 09:18:51 midway3-dm1.rcc.local winbindd[1056745]:??? #16 /lib64/libtevent.so.0(+0xed2f) [0x7fbf521fcd2f]
> Jul 28 09:18:51 midway3-dm1.rcc.local winbindd[1056745]:??? #17
2010 Nov 05
1
Una guía de estilo para programar en R...
Hola,
He seguido con interés el mensaje de Carlos sobre la guía de estilo para
programar en R aparecida en Google y las reacciones que ha generado.
En líneas generales creo que la guía Google es bastante floja, estoy de
acuerdo con la mayoría de comentarios iniciales de Carlos y en particular
con el hecho de que no trata en absoluto (ni lógicamente promueve) la
creación de packages. Otro
2004 Oct 02
1
RCC compatibility patch
Would you consider the following patch to eval.c to allow compatibility
with RCC? (It's in the applyClosure function.)
@@ -432,6 +432,14 @@
SEXP f, a, tmp;
RCNTXT cntxt;
+#ifdef RCC
+ SEXP comp;
+ PROTECT(comp = getAttrib(op, install("RCC_CompiledSymbol")));
+ if (comp != R_NilValue) /* compiled version exists */
+ op = comp;
+ UNPROTECT(1);
+#endif
2006 Jan 30
5
Help with R: functions
Hello R-users
I am new to R and trying to write some functions. I have problems writing functions that takes a data set as an arguement and uses variables in the data. I illustrate my problem with a small example below:
sample data #------------------
visual24<-rnorm(30,3,5)
visual52<-rt(30,7)
dats<- data.frame(cbind(visual24,visual52))
remove(visual24, visual52)
2023 Jul 28
1
check_account: Failed to find local account with UID" issue / The university of Chicago
Hi Experts,
We encountered a weird issue after restarting the server. Seems everything working fine on the configuration side but the user?s not able to authenticate with the Samba server. Can you please help to investigate the issue?
Our setup details and configuration file + error logs + service status.
Samba:- 4.18.3-0
CentOS Linux release 8.4.2105
Authentication mechanism is SSSD
[root at
2008 Aug 27
2
coding rules
Dear all,
I am organizing a set of specific R code as package (to ease the
documentation and deployment of it to users).
Before doing so, I would like to know if there are written coding rules
for R (with functions, objects naming convention for example).
Thanks a lot,
Thomas
--
-------------------------------------------------------------
Thomas LOUBRIEU
IFREMER IDM/ISI
BP70
29280
2003 Sep 26
2
checking generic/method consistency
Hi,
I wrote a package for linear programming and want to submit it to CRAN.
Since the package 'quadprog' has a function with the name 'solve.QP' to
perform Quadratic Programming, I named my (main) function 'solve.LP'.
However 'R CMD check' gives one warning:
* checking generic/method consistency ... WARNING
solve:
function(a, b, ...)
solve.LP:
2012 Mar 19
2
fitted values with locfit
Dear memberships,
I'm trying to estimate the following multivariate local regression model using the "locfit" package:
BMI=m1(RCC)+m2(WCC)
where (m1) and (m2) are unknown smooth functions.
My problem is that once I get the regression done I cannot get the fitted values of each of this smooth functions (m1) and (m2). What I write is the following
library(locfit)
data(ais)
2012 Mar 14
0
diveMove 1.3.1
Version 1.3.1 of diveMove is now available on CRAN. Changes since
previous version (1.2.9) are:
o Improved formatting of code in vignette. Figure resolution reduced to
satisfy package check requirements.
o At least R 2.13.0 is required.
o Dives occurring in "trivial wet" periods are now identified.
o Improved validity checking for 'TDRcalibrate' objects.