[R] Embedding PDF into RTF document via R language

2017-09-22 Thread Fisher Dennis
R 3.4.1 OS X and Windows Colleagues I have a complicated problem that includes several components: R RTF PDF Using R (and a slew of RTF commands), I assemble a text document with an RTF extension. The document contains text, tables, and images (JPEG format, previously

[R] JPEG command not responding to size options

2015-04-24 Thread Fisher Dennis
R 3.2.0 OS X Colleagues I have a script that has been unchanged for years but I just noticed a difference in the output. A minimal example is: jpeg(file="xxx.jpeg", width=4, height=2, unit="in", pointsize=12, bg="white", res=150, quality=100) plot(1) graphics.off()

[R] Missing axis labels

2015-05-01 Thread Fisher Dennis
R 3.2.0 OS X This is a general question, not specific to OS X. Colleagues Often, one or more values on an axis will be omitted, presumably in order to prevent overlap. However, there are situations where I would like to override that omission. Sample code: pdf("labels.pdf", width=3,

Re: [R] Missing axis labels

2015-05-01 Thread Fisher Dennis
>> labels: >> >> plot(0:100, 0:100, xaxp=c(0, 100, 4)) >> >> will plot at 0, 25, 50, 75, 100 which leaves room for the last label. >> >> - >> David L Carlson >> Department of Anthropology >> Texas A&M Univer

[R] Failure to execute R CMD SHLIB successfully

2015-01-31 Thread Fisher Dennis
R 3.1.2 Windows 7 Colleagues I am working with c code that reads sas7bdat files into R. I have been successful in compiling and running the code in both OS X and Windows. Recently, the author of the c code added code that calls iconv.h (in order to convert encodings). Using the new version

[R] Output from file.info()$mtime

2014-08-07 Thread Fisher Dennis
R 3.1.1 OS X (and Windows) Colleagues I have some code that manages files. Previously (as late as 3.1.0), the command: file.info(FILENAME)$mtime == “” yielded T/F Now, it triggers an error: Error in as.POSIXlt.character(x, tz, ...) : character string is not in a stan

Re: [R] Output from file.info()$mtime

2014-08-08 Thread Fisher Dennis
4 AM, Prof Brian Ripley wrote: > On 07/08/2014 23:37, Fisher Dennis wrote: >> R 3.1.1 >> OS X (and Windows) >> >> Colleagues >> >> I have some code that manages files. Previously (as late as 3.1.0), the >> command: >> file.info(FI

[R] Creating a new column from a series of columns

2014-10-31 Thread Fisher Dennis
R 3.1.1 OS X Colleagues, I have a dataset containing multiple columns indicating race for subjects in a clinical trial. A subset of the data (obtained with dput) is shown here: structure(list(PLTID = c(7157, 8138, 8150, 9112, 9114, 9115, 9124, 9133, 9141, 9144, 9148, 12110, 12111, 12116, 12134

[R] Use of contrasts in ANOVA

2015-09-02 Thread Fisher Dennis
R 3.2.0 OS X Colleagues, I am confused about the implementation of contrasts in ANOVA. I have 4 groups (BATCH) in DATA. My code reads: contrasts(DATA$BATCH) <- c(-1, -1, 1, 1)/2 LM <- lm(VALUES ~ SIDN + BATCH, data=DATA) where bot

[R] plotmath problem

2016-01-01 Thread Fisher Dennis
R 3.2 OS X Colleagues, This should be very simple but the solution eludes me. I have a polymath label for a graphic: bquote(AUC[0-infinity]~(ng/ml~x~hours)) I would like the “x” to be replaced with a bullet. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessTha

[R] Additional polymath query

2016-01-02 Thread Fisher Dennis
R 3.2 OS X Colleagues Yesterday, I asked: I have a polymath label for a graphic: bquote(AUC[0-infinity]~(ng/ml~x~hours)) I would like the “x” to be replaced with a bullet. David Winsemius provided an answer: %.% (which is also known as “cdot”) That work

[R] Accessing objects manipulated in a function

2016-05-14 Thread Fisher Dennis
R 3.2.4 OS X and Windows Colleagues, I distribute some code to co-workers and I am trying to simplify their task. The issue is as follows: 1. The code automates an extensive set of processes. Many of the steps are standardized. However, some of the steps may require that users write snippe

[R] Syntax for error messages

2013-03-04 Thread Fisher Dennis
R 2.15 OS X and Windows Colleagues, I am running a lengthy R script (> 20K lines of code) within a GUI build in RealBasic. There are rare instances in which an error is triggered in R. I am trying to trap these based on their syntax. I have identified three general formats for error message

[R] rainbow producing colors that do not differ sufficiently

2013-03-06 Thread Fisher Dennis
R 2.15.2 OS X Colleagues, I often use rainbow to select colors. I encountered a surprise with rainbow(11). It yielded three greens (in positions 4-6). The first two of these are quite similar. The man pages suggest that this might be the case: equispaced hues in RGB space tend to c

[R] Understanding contents of packages

2013-04-11 Thread Fisher Dennis
Colleagues During the transition to R3.0.0 (OS X), one of the packages that I used -- SASxport -- did not work until I used the "type=source" option in install.packages. This led to an adventure: 1. I downloaded the package source:SASxport_1.2.4.tar.gz 2. in the

[R] Speeding up time conversion

2012-09-27 Thread Fisher Dennis
R 2.15.1 OS X.7.4 Colleagues, I have a large dataset (27773536 records, the file is several GB) that contains a column of date / time entries in the format: "2/1/2011 13:25:01" I need to convert these to numeric values (ideally in seconds; the origin [e.g., 1970-01-01] is not impor

[R] Failure of sas7bdat package

2012-10-04 Thread Fisher Dennis
R 2.15.1 OS 10.7 Colleagues I have been an enthusiastic user of the sas7bdat package in R. However, several recent sas7bdat files sent to me from different sources cannot be read by the package. The error message is: Error in read.sas7bdat(FILENAME) : unknown host W32_7PRO please r

[R] speeding read.table

2012-10-18 Thread Fisher Dennis
R 2.15.1 OS X Colleagues, I am reading a 1 GB file into R using read.table. The file consists of 100 tables, each of which is headed by two lines of characters. The first of these lines is: TABLE NO. 1 The second is a list of column headers. For example: TABLE NO. 1 COL1CO

Re: [R] speeding read.table

2012-10-18 Thread Fisher Dennis
ennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com On Oct 18, 2012, at 7:10 AM, Jason Edgecombe wrote: > On 10/18/2012 09:57 AM, Fisher Dennis wrote: >> R 2.15.1 >> OS

[R] Determining 32- vs. 64-bit Windows

2014-04-10 Thread Fisher Dennis
3.0.2 Windows Colleagues, If I am setting up code for others and I don’t know their configuration, what is the simplest way to find out the following within R: a. is the system 32- or 64-bit? b. if the system is 64-bit, is R 32- or 64-bit? Dennis Dennis Fisher MD P < (The "P

Re: [R] Determining 32- vs. 64-bit Windows

2014-04-10 Thread Fisher Dennis
p one or two interesting pointers. > > -pd > > On 10 Apr 2014, at 21:48 , Fisher Dennis wrote: > >> 3.0.2 >> Windows >> >> Colleagues, >> >> If I am setting up code for others and I don’t know their configuration, >> what is the simplest

[R] invalid multibyte string at 'C'

2014-04-11 Thread Fisher Dennis
R 3.0.2 OS X Mavericks Colleagues I have a file that I converted from SAS (sas7bdat) to CSV (filename: ORIGINAL.csv). I try to read it with read.csv and I receive the error message: Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = character(0L)) : i

[R] Identifying one or more TRUE in the middle of an array

2014-06-06 Thread Fisher Dennis
R 3.1.0 OS X Colleagues I have an array (I am using T/F rather than TRUE/FALSE for convenience) that could have patterns like: c(T, T, T, F, F, F, T, F, T, T, T) ## T at either end, a single T in the middle c(F, F, F, F, F, T, F, F, T, T, T) ## T at the

[R] Speeding reading of large file

2012-11-28 Thread Fisher Dennis
R 2.15.1 OS X and Windows Colleagues, I have a file that looks that this: TABLE NO. 1 PTIDTIMEAMT FORMPERIOD IPRED CWRES EVIDCP PREDRES WRES 2.0010E+03 3.9375E-01 5.E+03 2.E+00 0.E+00 0.E+0

Re: [R] Speeding reading of large file

2012-11-28 Thread Fisher Dennis
versity > College Station, TX 77843-4352 > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >> project.org] On Behalf Of Fisher Dennis >> Sent: Wednesday, November 28, 2012 11:43 AM >> To: r-help@r-project.org >

[R] Speeding reading of a large file

2012-12-03 Thread Fisher Dennis
Colleagues, This past week, I asked the following question: I have a file that looks that this: TABLE NO. 1 PTIDTIMEAMT FORMPERIOD IPRED CWRES EVIDCP PREDRES WRES 2.0010E+03

[R] Tracking what R actually executes

2014-01-02 Thread Fisher Dennis
R 3.0.2 All platforms Colleagues This question is probably conceptual rather than technical and I have not thought out all of the issues yet. Let’s say I have an extensive list of functions and some lines of code that call the functions. I would like to have a record of all the commands that

[R] Regular expressions on filenames

2014-01-15 Thread Fisher Dennis
R 3.0.2 OS X Colleagues I am writing code to read a large number of files in a particular folder. In some situations, there may be two versions of the file with different extensions, e.g.: FILE.csv FILE.xls I extracted the portion before the extension with: sub("\\..*$"

Re: [R] Handling large SAS file in R

2014-01-28 Thread Fisher Dennis
Marc I understand that R is staffed entirely by volunteers and I appreciate the massive efforts that have created this awesome software. My suggestion was aiming to encourage the Core team that one weakness of the present structure is less-than-optimal interchangeability with SAS. If this were

[R] labels on right y-axis

2013-12-12 Thread Fisher Dennis
OS X R 3.0.2 Colleagues, I am displaying two sets of values changing over time; as a result, I have two y-axes. I add a label for the right-side Y axis with mtext(side=3, line=1.2, TEXT). The text is parallel to the axis -- so far, so good. However, the text is rotated counterclockwise from

Re: [R] Impact of cex changing as a function of mfrow

2012-09-02 Thread Fisher Dennis
Duncan I are getting closer to an understanding. 1. "index" is not relevant to the discussion. i am focused solely on margin text 2. the size pf the margin text does not change between pages 3. however, the location does change, moreso on the top / right than on the

Re: [R] Kerning of italic text in plotmath

2012-05-15 Thread Fisher Dennis
David You missed the point -- the issue was not the spacing between WORDS. It was the spacing between LETTERS (as noted in the original email) Other suggestions would be helpful. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-866-PLessTha