[R] read.csv error: invalid multibyte string

2011-12-31 Thread Dennis Fisher
an readLines handle that character string whereas read.csv cannot? 2. Reading the text connection is slow - it takes ~ 11 seconds to read a file with 11K rows. I edited the file to replace to offending character with "degree". read.csv reads the 11K rows of the new file in a fra

[R] Nonlinear regression aborting due to error

2011-10-11 Thread Dennis Fisher
ion would work better, please direct me. 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://

Re: [R] Plotting a registered sign

2012-03-01 Thread Dennis Fisher
\342") text(1, 1, expression(TEXT)) Clearly, I do not understand the subtleties of plotmath. Could someone explain? 2. How would one learn that \342 corresponds to the copyright sign in the symbol font? (i.e., is there a list of all possible characters) Dennis Fisher MD P < (The

[R] Rotating margin text

2012-04-10 Thread Dennis Fisher
for mtext and las does not offer this option. Is there some other means to rotate the text string? Thanks in advance. 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 [[a

[R] Plotting a registered sign

2012-02-29 Thread Dennis Fisher
R 2.14.0 OS X Colleagues Probably a simple question but it alludes me at the moment. I want to embed a registered sign in the text in a legend. The text would look like: SOMETEXT® with ® superscripted. Thanks in advance. Dennis Dennis Fisher MD P < (The "P Less Than&

[R] Kerning of italic text in plotmath

2012-05-15 Thread Dennis Fisher
t;, axes=F, xlab="", ylab="") mtext(side=3, line=-0, "Some Text") mtext(side=3, line=-1, expression(italic(Some) ~~ Text)) mtext(side=3, line=-2, expression(italic(Some) ~~ italic(Text))) Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLess

[R] Executing a command at interrupt

2008-05-22 Thread Dennis Fisher
is not executed. Is there some means in R to execute a final command. .Last does not accomplish this under my set of circumstances. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.com [

[R] Lengthy delay in sourcing a large function

2008-06-02 Thread Dennis Fisher
perience with this issue? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing li

[R] Startup speed for a lengthy script

2008-06-06 Thread Dennis Fisher
There is one major difference in the implementation. With the GUI, the commands are "pushed", i.e., the GUI opens R, then sends a continuous stream of code. Does anyone have any idea as to why the delay should be so different in the two settings? Dennis Dennis Fisher MD P < (T

[R] readLines fails to read entire file

2008-06-09 Thread Dennis Fisher
problem by working with the files separately. However, this is not optimal. Is there a work-around that enables me to read this file (and ignore the offending character)? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-77

[R] Odd behavior of remove command

2008-07-15 Thread Dennis Fisher
" was not found Warning in remove(list=EachFunction) : variable"function2" was not found Any thoughts as to the problem? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1

[R] Executing a telnet session from R

2008-04-06 Thread Dennis Fisher
function. Questions: 1. How do I enter the password into the command? 2. How do I execute the commands on the other machine? 3. Finally, how do I execute the 'logout' command (this should not differ from #2)? Thanks in advance for any help on this. Dennis Dennis Fisher MD P < (Th

[R] strsplit and sapply

2008-04-11 Thread Dennis Fisher
This yields: > SPLIT [[1]] [1] "a" [[2]] [1] "bb" "ccc" [[3]] [1] "" "e" "ff" Now I need to access the [1] portions of [[n]] - ("a", "bb", ""). I suspect that sapply is the correct t

[R] Random number generation

2008-05-10 Thread Dennis Fisher
st-ls()) sample(1000:, size=1) Also, the same problem occurs if I use runif instead of sample. Thoughts? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.com [[alternative HT

[R] recovering "status" after q(status=n) in Windows

2007-11-26 Thread Dennis Fisher
vel% is the (undocumented) equivalent of $status (Linux). However, in Windows, the value returned appears to be limited to either 0 (normal exit) or 1 (status set to a non-zero value) despite the claim that "valid values ... [are] 0:255 (as is the case in Linux). Does any one have an exp

[R] Dealing with missing EOL at end of file

2008-09-17 Thread Dennis Fisher
are easier approach to the entire problem? 2. Is there any risk in having two EOL characters at the end of the file (i.e., need I test for the presence of EOL at the end of the file or can I append EOL to any file with no potential harm? Dennis Dennis Fisher MD P < (The "P Less Than&

[R] proper use of textConnection

2008-10-12 Thread Dennis Fisher
= 22000 Sun Oct 12 07:18:04 2008 N lines = 23000 Sun Oct 12 07:19:17 2008 N lines = 24000 Sun Oct 12 07:20:36 2008 N lines = 25000 Sun Oct 12 07:22:02 2008 N lines = 26000 Sun Oct 12 07:23:36 2008 Any clever ideas will be greatly appreciated. Dennis

[R] Calculating confidence limits for the difference between means

2008-10-22 Thread Dennis Fisher
rence. I suspect that several participants in this board have implemented code to so this. I hope that someone is willing to share the code. Thanks in advance. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220

[R] identifying what labels have been created in a plot

2009-01-30 Thread Dennis Fisher
any suggestions. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

[R] Capturing info from system calls in Windows

2008-01-26 Thread Dennis Fisher
, "exit.status"): > [1] 0 As you can see, Windows replies "no input files"; however, that info is not captured in TEST. I presume that this is because standard error is dealt with different in Windows compared to Unix-line platforms. Any thoughts on how to capture standard e

[R] Reading a file created with Fortran

2008-02-26 Thread Dennis Fisher
e to understand it). Can anyone advise as to an efficient means to read these data and separate into columns? Thanks. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.com [

[R] Unexpected behavior of difftime in relationship to daylight savings time

2008-11-03 Thread Dennis Fisher
00", "2008-11-02 01:17:00") > Time difference of 1 mins Not expected: > > difftime("2008-11-02 01:17:00", "2008-11-02 01:16:00") > Time difference of 1.016667 hours Can anyone explain this? Dennis Dennis Fisher MD P < (The "P Less Than&

[R] Unexpected behavior of clocktime related to daylight savings time

2008-11-07 Thread Dennis Fisher
01:16:00", "2008-11-02 01:15:00") > Time difference of 1 mins > > difftime("2008-11-02 01:18:00", "2008-11-02 01:17:00") > Time difference of 1 mins Not expected: > > difftime("2008-11-02 01:17:00", "2008-11-02 01:16:00") > Time dif

Re: [R] Unexpected behavior of clocktime related to daylight savings time

2008-11-08 Thread Dennis Fisher
this an OS issue or an R issue (i.e., my "difftime" commands below appear to show that DST takes effect as 1:16, not 1:100)? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.com On Nov 7,

[R] Replacing tabs with appropriate number of spaces

2008-12-09 Thread Dennis Fisher
number of spaces (e.g., if the string preceding the tab has 29 characters, add 3 spaces), then paste(..., sep="") However, I am sure a more elegant approach exists. Can anyone offer one? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan

[R] opening a PDF document

2008-12-14 Thread Dennis Fisher
quot;) is successful. Is there a comparable command line command for Windows or Linux? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.com __ R-help@r-project

[R] Follow-up on "openPDF" command

2008-12-15 Thread Dennis Fisher
, PDFFILENAME)) } else invisible() } This version calls other functions that I have written, e.g., UNIX and LINUX, each of which identifies the OS. The SYSTEM command is specific for the OS (e.g., system in OS X and Linux, shell in Windows; intern=T in all cases). If anyone has

[R] Sourcing encrypted files

2007-09-17 Thread Dennis Fisher
my goals using something on the command line? Of note, the scripts are not terribly long - 50-200 lines each. Thanks Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.co

[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

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

<    1   2