similar to: C basic indentation

Displaying 20 results from an estimated 9000 matches similar to: "C basic indentation"

2003 May 17
1
R indentation
I use Gnu emacs 21, Linux RH9 and R-1.7.0. I have succeeded to get the recommended indentation of 4 in C thru customization as described in 'R-exts', p.73, but I can't get it to work in R code. Can someone help, for instance by sending me the appropriate lines in '.emacs'? Thanks! --- G?ran Brostr?m tel: +46 90 786 5223 Department of Statistics
2004 Apr 02
1
Underscore and ESS
This is a question that I should have sent to 'ess-help', but I take my chances... In 'NEWS' (1.9.0) I read the good news o Underscore '_' is now allowed in syntactically valid names, and make.names() no longer changes underscores. Very old code ... but when I try it in emacs (ESS 5.1.24), my '_' are changed to ' <- '! What can I do?
2004 Sep 20
0
[Old '.so' file
I noticed the same thing as I reported below, when I upgraded from R-2.0.0-alpha-20040918 to today's beta version: 'R CMD check' failed as before; but after cleaning 'src' from .o and .so files, it worked again. So the two-day-old '.so' file is obviously different from today's. Has compiler directives changed in the two last days? Or what is happening? G?ran On
2005 Sep 05
12
TeX distribution on Windows
I'm looking for a Windows distribution of TeX that works with R, after a few years' absence from Windows. On Duncan Murdoch's Rtools page fptex is still recommended, but it turns out that fptex is "defunct" as of May 2005, see http://www.metz.supelec.fr/~popineau/xemtex-7.html So, what is suggested? TUG (tug.org) recommends something called proTeXt, which is said to be
2004 Aug 09
1
ess settings
Dear R users, I downloaded an ess-5.2.2 package and hope to use emacs as front to work with R. I modified ~/.emacs and start R by M-x R. But I found when I quited the R session, it still asked me to save the work space or not. I added inferior-R-args with "--save" args. But it seemed that it had no effect. Can you tell me how to pass the arguments other than --no-readline to
2003 May 14
2
Two names of a function
Is it possible to let a function be known under two names without having two identical copies of the function body? --- G?ran Brostr?m tel: +46 90 786 5223 Department of Statistics fax: +46 90 786 6614 Ume? University http://www.stat.umu.se/egna/gb/ SE-90187 Ume?, Sweden e-mail: gb at stat.umu.se
2004 Dec 07
1
read.spss: unrecognized record type
When reading an spss file, I get the following message: Warning message: ../totmorH.sav: Unrecognized record type 7, subtype 13 encountered in system file. What does it mean? Do I have to worry? The result looks as expected. I do not have (easy) access to SPSS, so I cannot check exactly that I got what I should have. Thanks, G??ran And, I'm using R-2.0.1 on Debian testing (from source).
2005 Mar 24
1
Books on survival analysis and R/S
I will be giving a course in survival analysis using R (of course!) for people who know nothing about the subject (including R), but know basic statistics. I'm looking for a suitable course book. Therneau & Grambsch (2000) is an excellent book, but too much for this course. I need somthing more elementary. I have a vague memory saying that such books exist, but I cannot find any for the
2005 Jan 25
2
tapply and names
I have a data frame containing children, with variables 'year' = birth year, and 'm.id' = mother's id number. Let's assume that all the births of each mother is represented in the data frame. Now I want to create a subset of this data frame containing all children, whose mother's first birth was in the year 1816 or later. This seems to work: mid <-
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
2005 May 22
1
R-exts.texi: nuke-trailing-whitespace has changed name (PR#7888)
Full_Name: Bj?rn-Helge Mevik Version: 2.1.0 OS: GNU/Debian 3.0 Linux Submission from: (NULL) (80.111.104.162) In Appendix B R coding standards of the Writing R Extensions manual, Emacs/ESS users are encouraged to use (add-hook 'ess-mode-hook (lambda () (ess-set-style 'C++) ;; [snip] (add-hook 'local-write-file-hooks
2003 Jun 20
3
namespaces not available
This happened to me with R-1.7.0, Linux RH9: ------------------------------------------------------------------ > q() Save workspace image? [y/n/c]: y Warning messages: 1: namespaces may not be available when loading 2: names in persistent strings are currently ignored gb at lasker:~/R/test$ R R : Copyright 2003, The R Development Core Team Version 1.7.0 (2003-04-16) R is free software
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)
2008 May 03
1
ESS and Xemacs version 21.5.28
Hi, When I start Xemacs version 21.5.28 (in Unix), using the init.el: (setq bell-volume 0) (setq sound-alist nil) (setq grep-find-use-xargs nil) (require 'ess-site) I get the following error: (1) (initialization/error) An error has occurred while loading $home/.xemacs/init.el: Cannot open load file: "ess-site" Backtrace follows: signal(file-error ("Cannot open
1999 Dec 07
4
Finding indices with a certain property
I want the indices i for which x[i] < 0 (say): > x <- c(1, -1, 3, 3, -2) > where.negative(x) [1] 2 5 Surely where.negative is something simple, but how? G?ran -------------------------------------------------------------- G?ran Brostr?m Department of Statistics tel: +46 90 786-5223 Ume? University fax: +46 90 786-6614 S-90187 Ume?, Sweden
2003 Dec 18
1
Manova
Dear R-helpers, In a data set I got from a medical doctor there are six treatment groups and (about) 5 bivariate responses in each group. Using 'manova', it is easy to see significant differences in treatment effects, but the doctor is more interested in the correlation between the two responses (within groups). I'm willing to assume a common value over groups, and one way of
2004 Sep 19
1
Namespace problem
Now I try to add some C and Fortan code to my package, so the NAMESPACE file is useDynLib(eha) importFrom(survival, Surv) export(mlreg.fit, risksets) but I get ..... * checking R files for library.dynam ... OK * checking S3 generic/method consistency ... WARNING Error in .try_quietly({ : Error in library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) :
2004 Oct 07
1
sample suggestion
I have been bitten by what is clearly described on the help page for 'sample', namely sampling from a population of size one. I agree that it is convenient to have an exception if 'length(x) == 1', but my suggestion is to enforce the exception only if 'x' is numeric. In any case, if x is not numeric and of length 1, all you get is an error message. I would like
2005 Jan 03
1
row ("FORTRAN") order?
Reading about 'R_max_col' in "Writing R extensions", Version 2.1.0,(2005-01-03), I find: "Given the nr by nc matrix matrix in row ("FORTRAN") order, ..." Looks like a contradiction to me, since FORTRAN stores matrices columnwise. So is this a documentation bug? -- G?ran Brostr?m tel: +46 90 786 5223 Department of Statistics
2008 Oct 03
1
Memory crash
Hello, I get a segfault when running glmmboot in my own package glmmML. Has happened many time before, but this time I get no hint of where in my C functions the error might be. I give the output below. Can this be an R bug? I suspect it has to do with repeated calls to 'vmmin' like this: for (...){ vmax = vmaxget(); vmmin(*p, b, &Fmin, bfun,