Re: [R] Compressing a sequence

2025-02-22 Thread Dennis Fisher
paste(x[s], x[e], sep="-")) }, start_idx, end_idx) paste(ranges, collapse=", ") } numbers <- c(1, 3, 4, 5, 7, 8, 12, 13, 14, 15, 20) cat("original sequence is:\t\t", numbers, "\n") cat("collapsed text string is:\t", format_range

[R] Compressing a sequence

2025-02-21 Thread Dennis Fisher
R 4.4.0 OS X Colleagues I have a sequence like: 1, 3, 4, 5, 7, 8, 12, 13, 14, 15, 20 I would like to display it as: 1, 3-5, 7-8, 12-15, 20 Any simple ways to accomplish this? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1

[R] Referencing Sys.Date to a different time zone

2024-06-28 Thread Dennis Fisher
automatic, regardless of where in the world I am located. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com <http://www.plessthan.com/> [[alternative H

[R] Extracting values from Surv function in survival package

2024-05-15 Thread Dennis Fisher
2, SUBDATA[, EXP.STRAT]=2 5 5168 81 NA SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=3 1 1 22 NA NA it should be easy to get “events”. Any thoughts? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753

[R] adding "Page X of XX" to PDFs

2023-12-02 Thread Dennis Fisher
-- the original PDF contains a timestamp on each page -- the new version would have a different timestamp -- so I would prefer to not use this approach. Has anyone thought of some terribly clever way to solve this problem? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Ph

[R] Timezone question

2023-08-17 Thread Dennis Fisher
R 4.3.1 OS X Colleagues Is there a simple way to determine the timezone offset for my present location. For example, during standard time in the US, the offset from GMT is 8 hours in California. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessTh

[R] need help with plotmath and/or plotting unicode characters

2023-06-08 Thread Dennis Fisher
is solved: mtext(side=3, paste0("N ", UNICODE, " ", XX, ": ", YY)) PLOTMATH: mtext(side=3, bquote(N <= .(XX) ~":" ~ .(YY))) This comes close: N ≤ 2 : 13 but I want to remove the space between the 2 and ":" Dennis Dennis Fisher

[R] printing a data.frame without row numbers

2023-03-27 Thread Dennis Fisher
WITHOUT the row numbers: COL1 COL2 1 10 29 38 47 56 Is there any simple way to accomplish this, short of writing my own print method or outputting line-by-line using cat? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866

[R] VT-100 terminal escape sequences

2023-03-05 Thread Dennis Fisher
[?25h text to disappear. If the problem originates in XOJO, I assume that there is nothing that can be done in R to solve the problem. But, if there is something that can be done in my R code, it would be useful to know about it. Dennis Dennis Fisher MD P < (The "P Less Than&

[R] Printing special characters

2023-01-16 Thread Dennis Fisher
strings, then using plotmath)? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.

Re: [R] Adding page numbers to existing PDFs

2022-10-21 Thread Dennis Fisher
Bert et al. I searched with slightly different text and found various packages that might be relevant: pdftools staplr QPDF However, as far as I can tell, none of these offers the specific functionality that I need. Dennis Dennis Fisher MD P < (The "P L

[R] Adding page numbers to existing PDFs

2022-10-21 Thread Dennis Fisher
Python using reportlab.pdfgen — however, the file size increases prohibitively. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com __ R-help@r-project.org mailing list -- T

[R] readxl/lifecycle/rlang

2021-12-01 Thread Dennis Weygand
I have been using read_excel for years... suddenly today I have this problem: > T1 <- read_excel(fname,sheet="T1") Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘lifecycle’ So I install lifecycle: install.packages("lifecycle") WARNING:

[R] readxl

2021-12-01 Thread Dennis Weygand
I have been using readxl function for years... Suddenly, today, I get an error message: > T1 <- read_excel(fname,sheet="T1") Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘lifecycle’ Does anyone know what has happened? D.P. Weygand Old D

[R] Readxl on Mac

2020-12-01 Thread Dennis Weygand
>From the following lines of code on an iMac running Catalina 10.15.7 library(readxl) fname <- "/Volumes/SD/LabData/Lorentz/Lorentz.xlsx" Helm <- read_excel(fname,sheet="Helmholtz") I get the following annoying error: Error: Evaluation error: zip file To me this makes no sense: the file in qu

Re: [R] segfault from systemfonts::system_fonts

2020-11-03 Thread Dennis Fisher
Duncan Thanks for responding -- but your response did not help my mood. Executing: .Call("_systemfonts_system_fonts_c") triggered the segfault (as you proposed). Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-

[R] segfault from systemfonts::system_fonts

2020-11-03 Thread Dennis Fisher
other functions in systemfonts without problems -- only system_fonts triggers the segfault. Another similar setup on OS X does not trigger the same problem, so the problem is more likely something in my system rather than a problem in R. Does anyone have any ideas on how one might address this? D

Re: [R] Package recommendations for outputting table with cell formatting

2020-10-23 Thread Dennis Fisher
Patrick Doing this in Excel is certainly an option. But I would like to learn how to do it in R. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com > On Oct 23, 2020, at 6:15 PM, Patrick (Malone Quantit

[R] Package recommendations for outputting table with cell formatting

2020-10-23 Thread Dennis Fisher
d work; outputting directly to Word would be even better. I expect that several packages can accomplish this. I am looking for recommendations as to which package (or combination) of packages is best to accomplish this. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax:

[R] Adding text to existing PDF's created with R

2020-10-07 Thread Dennis Fisher
join the separator pages and the original PDFs using python's join command. But I have not been able to figure out how to add page numbers to the existing PDF's. Any help would be appreciated. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PL

Re: [R] Removing a space from a string

2020-07-29 Thread Dennis Fisher
it contains no spaces. The offending entity here is textreadr:read_dicx That addresses how the spaces arose. But, my question was not about that — rather I was looking for a general fix when that situation arises. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone

Re: [R] Removing a space from a string

2020-07-28 Thread Dennis Fisher
any idea as to the source. Thanks for your regular expression suggestion. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com <http://www.plessthan.com/> > On Jul 28, 2020, at 5:11 PM, Richard O'K

Re: [R] Removing a space from a string

2020-07-28 Thread Dennis Fisher
Only the spaces in STRING. However, if I inadvertently delete the space between STRING and NN, I can add it back in. Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com <http://www.plessthan.com/> > On Ju

Re: [R] Removing a space from a string

2020-07-28 Thread Dennis Fisher
It is possible that there will be > 1 space. But, most likely only one (i.e., a solution for one space will suffice; a solution for > 1 space would be even better) Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.

[R] Removing a space from a string

2020-07-28 Thread Dennis Fisher
I would like a general approach to deleting a space, but only if it appears before the period. Any suggestions on a regular expression for this? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.c

[R] file.choose()

2020-03-03 Thread Dennis Weygand
How do I change the default directory that file.choose() (Windows-10) uses? D.P. Weygand [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

[R] Did the output from summary(lm(...)) change

2020-01-24 Thread Dennis Fisher
P value from: summary(lm(YVAR ~ XVAR))$coeff but I am curious as to whether my memory is flawed. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com <http://www.plessthan.com/> [[alter

[R] Problem related to multibyte string in CSV file

2019-11-14 Thread Dennis Fisher
is there any simple way to accomplish this? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see ht

Re: [R] Identifying presence of Java

2019-11-10 Thread Dennis Fisher
their suggestions. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com <http://www.plessthan.com/> > On Nov 10, 2019, at 11:49 AM, Abby Spurdle wrote: > > shell ("Java -version 2>&1&quo

Re: [R] Identifying presence of Java

2019-11-09 Thread Dennis Fisher
have 13.03.1 installed whereas R is looking for 11.0.1 Any idea how to fix this? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com > On Nov 9, 2019, at 9:35 AM, Dirk Eddelbuettel wrote: > > > Denn

Re: [R] Identifying presence of Java

2019-11-09 Thread Dennis Fisher
is not being displayed. Is there a way to capture that output? If so, I can certainly figure out how to parse it. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com <http://www.plessthan.com/> > O

[R] Identifying presence of Java

2019-11-09 Thread Dennis Fisher
s) but I cannot capture what is displayed on the console. I have also tried “system2” with various TRUE/FALSE permutations without success. Any clever ideas? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessTha

[R] rmarkdown

2018-11-29 Thread Dennis Weygand
When I try to create an rmarkdown file in Rstudio, I get the error below. What am I doing wrong? Sent from Mail for Windows 10 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] Problem with geterrmessage()

2018-02-22 Thread Dennis Fisher
Luke Thanks — I revised the code to: ERRORMESSAGE <- try(source(USERSCRIPTFILE, local=T), silent=T) print(ERRORMESSAGE) now returns: $value [1] 0 $visible [1] FALSE Not clear what to make of that. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax:

[R] Problem with geterrmessage()

2018-02-22 Thread Dennis Fisher
gure out how to do so. Any suggestions would be welcome. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

[R] Help with regular expressions

2018-02-12 Thread Dennis Fisher
ssion code to accomplish this? Thanks. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https

Re: [R] Timezone problem with 3.4.2

2017-11-30 Thread Dennis Fisher
Mark Thanks for pointing this out. I did a default installation of R. Does this mean that I need to reinstall from the command line? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com <http://www.plesstha

[R] Timezone problem with 3.4.2

2017-11-30 Thread Dennis Fisher
1] "2017-12-01" Warning message: In as.POSIXlt.POSIXct(Sys.time()) : unknown timezone 'zone/tz/2017c.1.0/zoneinfo/America/Los_Angeles' There is nothing odd about the date/time settings on the computer. I then tried: > Sys.timezone() [1] NA Previously, there was not a pro

[R] Embedding PDF into RTF document via R language

2017-09-22 Thread Fisher Dennis
pport for R is far better than that for RTF. Any help would be appreciated. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com __ R-help@r-project.org mailing list -- To U

[R] Using quantmod to obtain current Dow Jones index

2017-09-06 Thread Dennis Fisher
e Open High Low Volume ^DJI N/A N/A N/A N/A N/A N/A N/A Two questions: 1. Is there some way to obtain the current DJI using quantmod? 2. If not, can someone suggest alternatives? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-8

Re: [R] PROC MIXED RANDOM equivalence in R nlme

2017-08-11 Thread Dennis F. Kahlbaum
Hi David: Thanks for your response and suggestions. --Dennis On 8/11/17 2:03 PM, David Winsemius wrote: On Aug 11, 2017, at 7:56 AM, Dennis F. Kahlbaum wrote: Hi Robert: Thanks for your response, as well. I'm sorry. As you've discovered, I made some capitalization errors when po

Re: [R] PROC MIXED RANDOM equivalence in R nlme

2017-08-11 Thread Dennis F. Kahlbaum
nce I don't have SAS v6.12 anymore, I can't provide the so-called "correct results". As for the R hang, your wording is correct: "R gets caught in a processing loop that produces no errors or warnings", even after 15 minutes on an 8-core Mac Pro. As I recall, the SAS

Re: [R] PROC MIXED RANDOM equivalence in R nlme

2017-08-11 Thread Dennis F. Kahlbaum
nd benzene. Each case also has an entry for the vehicle being tested and the name of the study. Since the input data set can vary, so can the number of observations and the level counts for the two categorical variables. I hope this helps clarify things. --Dennis On 8/11/17 8:25 AM, Thierr

[R] PROC MIXED RANDOM equivalence in R nlme

2017-08-10 Thread Dennis F. Kahlbaum
I am trying to reproduce some old SAS PROC MIXED code using R and nlme. The data consists of emission readings from vehicles and fuel properties. All variables are real numbers except "study" and "vehicle", which are character. Unfortunately, since the data are confidential, I'm unable to provi

[R] Efficient means to link two data frames

2016-09-29 Thread Dennis Fisher
would then append the corresponding “Value” in the TestValue column The result would be: TestDay TestValue 1 4 103 2 1184 3 15 109 I can accomplish this with brute force but I suspect that there is some clever day to vectorize this. Any help would be appreciated

[R] Regression expression to delete one or more spaces at end of string

2016-08-02 Thread Dennis Fisher
surprise, characters other than the trailing space were deleted but the trailing space remained. Guidance on the correct syntax would be appreciated. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com

Re: [R] Accessing objects manipulated in a function

2016-05-14 Thread Dennis Fisher
command. Problem solved. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com > On May 14, 2016, at 9:45 AM, Jeff Newmiller wrote: > > I think you have boxed yourself into a corner, much like someone pai

[R] Accessing objects manipulated in a function

2016-05-14 Thread Fisher Dennis
y to manipulate environments such that the changes within the function are AUTOMATICALLY transferred to the environment outside the function? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com <http://www.plessthan.c

[R] Additional polymath query

2016-01-02 Thread Fisher Dennis
ours)) As much as I enjoy plotmath, it remains a bit of a mystery to me. Any advice would be appreciated. Dennis 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 _

[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)

Re: [R] Get means of matrix

2015-11-18 Thread Dennis Murphy
e R do.call(rbind, lapply(L, colMeans)) # Method 2: plyr package library(plyr) ldply(L, colMeans) Dennis On Wed, Nov 18, 2015 at 2:19 AM, Jesús Para Fernández wrote: > Hi everyone > > I have a dataframe "data" wich is the result of join multiple csv (400 rows > and 600c

Re: [R] Multibyte strings

2015-09-26 Thread Dennis Fisher
tted using text files (*.TXT) and the > data should be submitted using SAS transport files (*.XPT). Dennis 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 Sep 26, 2015, at 5:5

[R] Multibyte strings

2015-09-25 Thread Dennis Fisher
around would be to edit out multibyte strings. Is there a simple way to find and replace them? Or is there some other clever approach that bypasses the problem? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-8

Re: [R] Accessing defunct package

2015-09-25 Thread Dennis Fisher
ñåºA Other than editing the object to remove errant text, is there some general way to prevent this error? Dennis 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 Sep 25, 2015, a

[R] Accessing defunct package

2015-09-25 Thread Dennis Fisher
t’ Other than reinstalling an old version of R (< 3.0.0), is there some way that I can use the package? Dennis 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

Re: [R] Exporting column names with spaces with write.csv() XXXX

2015-09-05 Thread Dennis Murphy
text = ' "no good","no good at all" 1,4 2,5 3,6') no good no good at all 1 1 4 2 2 5 3 3 6 Thanks for the MWE, Jim. Dennis On Sat, Sep 5, 2015 at 7:57 PM, Jim Lemon wrote: > Hi Dan, > I don't

[R] Use of contrasts in ANOVA

2015-09-02 Thread Fisher Dennis
now run the code, the estimate for BATCH did not change — however, its SE (and the resulting t value) changed 10%. I don’t understand how the how.many option in contrasts works. Can anyone offer an explanation? Thanks in advance. Dennis Dennis Fisher MD P < (The "P Le

[R] Implementation of contrasts

2015-07-07 Thread Dennis Fisher
<- c(1, 1, 1, -3)/3 without success (they yielded results markedly different from SAS) I have searched the web extensively but the explanations of contrasts in R are not particularly understandable. Can anyone help me understand the specifics of this situation? Thanks in advance. Dennis Dennis F

Re: [R] if else statement for rain data to define zero for dry and one to wet

2015-06-06 Thread Dennis Murphy
e, which BTW extends not just to 0/1 return values but to 0/x return values, where x is a nonzero real number. Dennis On Sat, Jun 6, 2015 at 12:50 AM, Jim Lemon wrote: > Hi rosalinazairimah, > I think the problem is that you are using "if" instead of "ifelse". Try t

Re: [R] geom_text in ggplot (position)

2015-05-13 Thread Dennis Murphy
quot; mm <- ddply(m, .(variables, cat), mutate, pos = cumsum(recuento) - 0.5 * recuento) ## this is the key part ggplot(mm, aes(x = cat, y = recuento, fill = cO)) + geom_bar(stat = "identity") + geom_text(aes(y = pos, label = recuento)) + facet_wrap(~ variabl

Re: [R] Missing axis labels

2015-05-01 Thread Fisher Dennis
Jim Thanks for this suggestion— it looks like that accomplish my goal, although I am frustrated that there does not appear to be a simlpe answer to my initial question, i.e., is there a way to tell whether the usual manner of created labels prints all entries. Dennis Dennis Fisher MD P

[R] Missing axis labels

2015-05-01 Thread Fisher Dennis
e the font size 2. force the entry, e.g., axis(1, 100, at=100) Dennis 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 __ R-help@r-p

[R] JPEG command not responding to size options

2015-04-24 Thread Fisher Dennis
inch is not being handled correctly. I can confirm this by replacing res=150 with res=72 The resulting image is the intended size. Is this a bug? The workaround appears to be restoring res=72 but that does not seem to be an ideal solution. Dennis Dennis Fisher MD P < (Th

Re: [R] R code/package for calculation of Wasserstein distance between two densities

2015-04-20 Thread Dennis Murphy
Hi Ranjan: Try this: library(sos) findFn("Wasserstein") It appears there are three packages that might be relevant: HistDAWass, transport and TDA. HTH, Dennis On Sat, Apr 18, 2015 at 8:06 PM, Ranjan Maitra wrote: > Dear friends, > > Before reinventing the wheel, I was wond

[R] Vectorizing a task

2015-04-14 Thread Dennis Fisher
The command: paste0("c(", paste(paste(ALLSTART, ALLEND, sep=":"), collapse=","), ")") creates the text for START.to.END, but I can’t figure out how to evaluate that expression. I could build the vector step-by-step but that seems quite inefficient.

Re: [R] transpose a data frame according to a specific variable

2015-02-09 Thread Dennis Murphy
One way is to use the reshape2 package: library(reshape2) dcast(DF, id ~ Year, value.var = "Day") Dennis On Mon, Feb 9, 2015 at 7:47 AM, jeff6868 wrote: > Dear R-users, > > I would like to transpose a large data.frame according to a specific column. > Here's a rep

Re: [R] color heatmap according to value ranges

2015-02-06 Thread Dennis Murphy
uot;darkblue", "blue", "lightblue", "grey90")) + scale_x_continuous(expand = c(0, 0)) + scale_y_continuous(expand = c(0, 0)) + theme(panel.border = element_rect(colour = "black", fill = NA)) Dennis On Fri, Feb 6, 2015 at 7:13 AM, wrote: > Probabl

[R] Failure to execute R CMD SHLIB successfully

2015-01-31 Thread Fisher Dennis
reference to > `_imp__libiconv_close' > collect2: ld returned 1 exit status > The errors all reference libiconv. Note that the first line in the errors references extralibs64. I don’t understand where this is coming from since the gcc command is created by R CMD SHLIB usin

Re: [R] Paste every two columns together

2015-01-28 Thread Dennis Murphy
Hi: Don't know about performance, but this is fairly simple for operating on atomic vectors: x <- c("A", "A", "G", "T", "C", "G") apply(embed(x, 2), 1, paste0, collapse = "") [1] "AA" "GA" "TG

[R] abline?

2015-01-22 Thread Dennis P. Weygand
I am a very new user of R, trying to do a linear fit to data, plot(r2,d) plots my data correctly, I do a linear fit: res = lm(r2~d) gives a fit to the data, but abline(res,col=“red”) displays nothing. Again, I am a novice, but what am I doing wrong? DPW __

[R] duplicated function

2014-11-18 Thread Dennis Fisher
)) If my suggestion would yield unintended consequences, it can certainly be ignored. Dennis 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 [[alternativ

Re: [R] how to determine power in my analysis?

2014-11-08 Thread Dennis Murphy
Hi Kristi: I think this paper elucidates the problem Bert mentioned. A thorough and careful reading of the last two sections should clarify what post-hoc power is and is not. http://www.stat.uiowa.edu/files/stat/techrep/tr378.pdf Dennis On Sat, Nov 8, 2014 at 11:25 AM, Kristi Glover wrote

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

2014-10-31 Thread Fisher Dennis
ce..RACE6.", "Specify.Other.Race..RACEOTH."), class = "data.frame", row.names = 43:64) I would like to add a column that indicates which of the other columns contains “Yes”. In other words, that column would contain: Black..RACE3. Asian..RACE2. Whit

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

2014-08-08 Thread Fisher Dennis
iew Dalgaard’s list of changes in each new version — it does not contain anything about this bug fix. Dennis 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 Aug 8, 2014, at 1:5

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

2014-08-07 Thread Fisher Dennis
). Of note, I ran: str(file.info(FILENAME)$mtime) in both versions of R and the results did not differ Can anyone explain what changed so that I can search my code efficiently? Thanks in advance. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessTh

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

2014-06-06 Thread Fisher Dennis
identify the indices (if any) of these T values in the middle A brute force approach would be to strip off any contiguous T values from each end, then look for any remaining T values. Can anyone propose a more clever approach? Dennis Dennis Fisher MD P < (The "P Less Than" Company)

Re: [R] ggplot barplot error

2014-05-15 Thread Dennis Murphy
ear is common, here is one way to do it: #--- # Convert to Date format so that we can plot by actual date DF$Date <- as.Date(as.character(DF$Date)) # Need scales package to change date format library(scales) ggplot(data = DF, mapping = aes(x = Date, y = Flows)) + geom_bar(data = subset(DF, Cat

[R] Displaying "<=" in axis values

2014-04-15 Thread Dennis Fisher
? Thanks. Dennis 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 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

[R] invalid multibyte string at 'C'

2014-04-11 Thread Fisher Dennis
eplacements. The files are available for inspection at: http://www.plessthan.com/FILES/ARCHIVE.zip Dennis 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 _

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

2014-04-10 Thread Fisher Dennis
to make sure that I don’t call 64-bit c code when I am using 32-bit R (either in Windows 32- or 64-bit). Dennis 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 Apr 10, 201

[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

Re: [R] How to plot data using ggplot

2014-04-04 Thread Dennis Murphy
1. Look into the ggmap package if you want to overlay your data onto a map. 2. Re your color scale representation, define 'appropriately'. Do you mean a continuous range expressible in a colorbar or a discrete range, and if the latter, what intervals did you have in mind? Dennis On

[R] Getting rid of spaces in plot math

2014-03-31 Thread Dennis Fisher
R 3.0.2 OS X Colleagues I am trying to label a graphic: Cortisol (µg/ml) A simplified version of the code is: plot(1) ; mtext(bquote("Cortisol ("~mu~"g/ml)")) This code inserts spaces around the mu: Cortisol ( µ g/ml) How can I suppress those spac

Re: [R] creating table with sequences of numbers based on the table

2014-03-13 Thread Dennis Murphy
en(Freq)) library(plyr) u <- mdply(tab, f)[, -2] Dennis On Thu, Mar 13, 2014 at 8:01 AM, arun wrote: > Hi, > Try: > Either > > tab <- read.table(text="pop Freq > 1 1 30 > 2 2 25 > 3 3 30 > 4 4 30 > 5 5 30 > 6

Re: [R] Math symbols in ggplot facets

2014-02-22 Thread Dennis Murphy
[0] == 3 * sqrt(2)")) ggplot(m, aes(x = displ, y = cty)) + geom_point() + facet_grid(. ~ drv, labeller = label_parsed) Dennis On Sat, Feb 22, 2014 at 3:24 AM, Lars Bishop wrote: > Hello, > > I would like to show in my facet labels the equivalent in LaTex of > $\sigma_{0}= \sqrt

Re: [R] Legend text populated with calculated values and super script?

2014-02-07 Thread Dennis Murphy
), ", ", Bias == .(spas_mbias), ", ", MAE == .(spas_mae), ", ", R^2 == .(spas_R2), ")")) plot(x,y, col="red1", pch=1); lines(x,z, type="p", col="green4",pch=3) legend("toplef

[R] Capturing output of a C executable

2014-02-02 Thread Dennis Fisher
which I then read into R. However, it would be better if I did not need to modify the C code. Does anyone have any ideas of how I can capture this output within R? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1

Re: [R] passing variable names to dplyr

2014-01-28 Thread Dennis Murphy
t see that he's done anything wrong; in fact, he's been exceptionally polite. If you want to yell at anybody, yell at me. Dennis On Tue, Jan 28, 2014 at 3:33 PM, David Winsemius wrote: > > On Jan 27, 2014, at 7:45 AM, Bos, Roger wrote: > >> All, >> >> I would lik

Re: [R] Handling large SAS file in R

2014-01-28 Thread Fisher Dennis
were improved, it would be a great service to the R community, particularly those of us in the pharmaceutical development world who must interface with SAS. I just wrote to David Smith at Revolution Analytics, encouraging him to consider taking this on (as you suggested). Dennis Dennis Fisher MD

[R] Handling large SAS file in R

2014-01-28 Thread Dennis Fisher
thout intermediate software. I would offer to participate in any efforts to accomplish this but I think that it is beyond my capabilities. Dennis Message: 23 Date: Mon, 27 Jan 2014 13:25:54 -0800 (PST) From: Frank Harrell To: r-help@r-project.org Subject: Re: [R] Handlig large SAS file in R Messa

Re: [R] demonstrating R in introductory class using point-and-click software

2014-01-15 Thread Dennis Murphy
dled with binary versions of R, you don't have to worry too much about the interface. Take notice that both packages have plug-in packages that you can load on top of the standard GUI. I find it a little disheartening that in this era, engineers in training are averse to programming, though. Sigh

[R] Regular expressions on filenames

2014-01-15 Thread Fisher Dennis
extensions) matched. Can someone provide me with the appropriate regular expression to deal with this? Thanks. Dennis 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 ___

[R] Encoding issue

2014-01-06 Thread Dennis Fisher
e of the string, R does not appear to detect it consistently. Perhaps I am not escaping things correctly or perhaps my understanding of this encoding is flawed. Can anyone provide some useful pointers here? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLess

[R] Tracking what R actually executes

2014-01-02 Thread Fisher Dennis
ent. Dennis 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 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

[R] labels on right y-axis

2013-12-12 Thread Fisher Dennis
from horizontal, whereas I would like it rotated clockwise. Neither srt nor las fixes this. I guess that one convoluted approach would be to use "text" rather than "mtext". However, positioning would be a nuisance and the xpd option would be needed. Is there any simpl

Re: [R] Help with removing extra legend elements in ggplot

2013-11-19 Thread Dennis Murphy
aesthetic. In this case you're mapping VegType to color and shape. You want to *set* the size aesthetic to a constant value, and that is done by assigning the value 10 to the size aesthetic outside of aes(). Dennis On Tue, Nov 19, 2013 at 4:35 PM, Matthew Van Scoyoc wrote: > No dice. I s

Re: [R] optimization

2013-11-16 Thread Dennis Murphy
> There are lots of errors in your code. In particular, the optimization > routines do not like functions that ignore the parameters. I would like to nominate this delicious riposte as a fortune candidate. Anyone to second the motion? Dennis On Sat, Nov 16, 2013 at 1:26 PM, Prof J C Nash

Re: [R] matrix values linked to vector index

2013-10-11 Thread Dennis Murphy
Attempting to follow the OP's conditions and assuming I understood them correctly, here is one way to wrap this up into a function: makeMat <- function(x) { stopifnot(is.integer(x)) nr <- length(x) nc <- max(x) # Initialize a matrix of zeros m <- matrix(0, nr, nc) # Condit

[R] Transposing the output of 'table'

2013-10-06 Thread Dennis Fisher
ric(TABLE)) However, I bet that a more clever approach exists? Any takers? Dennis 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 __ R-he

Re: [R] Cannot read XPT file using foreign package

2013-10-04 Thread Dennis Fisher
file with read.xport and it failed. Could there be an issue with the version of SAS (which appears to be 6.06) -- they are now up to version 9 (for Windows - I don't know the version # for UNIX). Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan

  1   2   3   4   5   6   7   8   9   10   >