Displaying 20 results from an estimated 10000 matches similar to: "Moving Rterm.exe to another location"
2009 Sep 29
3
Deleting a column in a dataframe by name
Colleagues,
Hopefully a simple problem: I want to delete a column with a known
name from a dataframe. I could write:
FRAME <- FRAME[, names(FRAME) != NAMETODELETE]
or
FRAME <- FRAME[, !names(FRAME) %in% c(NAME1, NAME2, ETC)]
Is there some simpler means to accomplish this?
Dennis
Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
2007 Sep 04
2
Recursive concatenation
Colleagues,
I want to create the following array:
"A1", "A2", "A3", "B1", "B2", "B3", "C1", "C2", "C3"
I recall that there is a trick using "c" or "paste" permitting me to
form all combinations of c("A", "B", "C") and 1:3. But, I can't
recall the
2008 Apr 11
3
strsplit and sapply
Colleagues,
I have some text:
TEXT <- c("a", "bb;ccc", "dddd;eeeee;ffffff")
I want to retrieve the portion of each element before the first
semicolon. I can split each element using strsplit:
SPLIT <- strsplit(TEXT, ";")
This yields:
> SPLIT
[[1]]
[1] "a"
[[2]]
[1] "bb" "ccc"
[[3]]
[1] "dddd"
2005 Oct 18
6
Subsetting a list
Colleagues,
I have created a list in the following manner:
TEST <- list(c("A1", "A2"), c("B1", "B2"), c("C1", "C2"))
I now want to delete one element from the list, e.g., the third. The
command
TEST[[3]]
yields (as expected):
[1] "C1" "C2"
The command
TEST[[-3]]
yields:
Error:
2008 Dec 15
3
opening a PDF document
Colleagues,
I am interesting in opening a PDF document via the command line from
both Windows, OS X, and Linux ( R version 2.8.0). I found a command
openPDF in Biobase. However, I would rather execute the command
myself. For example, in OS X:
> system("open filename.pdf")
is successful.
Is there a comparable command line command for Windows or Linux?
Dennis
Dennis Fisher
2005 Jul 22
3
Question regarding subsetting
I run R 2.1.1 in a Linux environment (RedHat 9) although my question
is not platform-specific.
Consider the following:
> A <- c("Prefix-aaa", "Prefix-bbb", "Prefix-ccc")
> B <- strsplit(A, "-")
> B
[[1]]
[1] "Prefix" "aaa"
[[2]]
[1] "Prefix" "bbb"
[[3]]
[1] "Prefix" "ccc"
How
2007 Aug 03
3
Sourcing commands but delaying their execution
Colleagues:
I have encountered the following situation:
SERIES OF COMMANDS
source("File1")
MORE COMMANDS
source("File2")
Optimally, I would like File1 and File2 to be merged into a single
file (FileMerged). However, if I wrote the following:
SERIES OF COMMANDS
source("FileMerged")
MORE COMMANDS
I encounter an error: the File2 portion of FileMerged
2006 Oct 21
2
Filling in a series
Colleagues
After reading in some clinical data, I discovered that the subject ID
column contains entries only for the first record for each
individual; subsequent rows are recorded as NA. For example:
> 1
> NA
> NA
> NA
> NA
> 2
> NA
> NA
> NA
> NA
> 3
> NA
> NA
> ...
I can think of various approaches to replace the NA values with
appropriate
2004 May 05
1
Ctrl-C with R.exe and Rterm.exe in R v1.9.0
Hi, I'm running R v1.9.0 on WinXP Pro. I noticed that R.exe and
Rterm.exe behave differently on Ctrl-C. Starting a Windows Command
prompt (cmd.exe) you get from running Rterm.exe:
C:\Program Files\R>rw1090\bin\Rterm.exe --vanilla --quiet
> ^C
> ^C
> 1+1
[1] 2
> Sys.sleep(100) # Ctrl-C after a few seconds
> ^C
> ^C
> 1+1
[1] 2
> q()
C:\Program Files\R>
2010 Feb 12
1
Identifying special characters in a text file
Colleagues
R 2.10.1 on a Mac
I read in textfiles using readLines, then I process those files, then I use R to execute another program. Occasionally those files contain characters other than letter / numbers / routine punctuation marks. For example, a bullet (option-8 on a Mac) triggers the problem.
Although R can read and process those characters, the other program cannot so I would like to
2002 May 19
1
rterm.exe and graphics windows
I have started using R 1.5.0 on Windows 2000. The refinement of this system
in such a short time is astounding, and I thank those who have worked on it
and made it available!
I have been using rterm.exe to develop R scripts in my preferred editor
(not emacs) by sending the command
rterm.exe --save < %f
where the editor substitutes the filename for %f. This works wonderfully,
and the
2009 Jan 30
3
identifying what labels have been created in a plot
Colleagues
R 2.8.0; OS X, Vista, Ubuntu Linux
In some instances, when I create a graphic using plot(XVAR, YVAR), it
would be valuable to know the values that R will display on the y-axis
(e.g., if the range of data is 0-70, it might display 0, 10, 30, 50,
70). Is there a simple means to access these values?
Also, in some instances, additional ticks appear between the displayed
values
2011 Mar 29
2
Probing a function
R 2.12.2
Windows 7
Colleagues,
I just took advantage of the function:
readWindowsShortcut
in R.utils. It accomplished my goals and I was interested in learning its inner workings. So, I typed the function at the command line (without arguments or parentheses). R returned:
function (...)
UseMethod("readWindowsShortcut")
<environment: namespace:R.utils>
providing no
2009 Nov 13
5
Help with complicated regular expression
Colleagues,
I am using R (2.9.2, all platforms) to search for a complicated text
string using regular expressions. I would appreciate any help you can
provide.
The string consists of the following elements:
SOMEWORDWITHNOSPACES
any number of spaces and/or tabs
(
any number of spaces and/or tabs
integer
any number of spaces and/or tabs
)
Examples include:
WORD ( 123 )
WORD(1 )
2009 Sep 23
2
Updating R for Linux
Colleagues,
Please forgive my ignorance of this topic. I am experienced with the
installation/use of R in OSX and Windows, much less so with Linux.
I just created a virtual machine of Ubuntu 9.0.4. Using the Synaptic
Package Manager, I installed R 2.8.1. I would like to obtain 2.9.x
and I am having trouble doing so using the tools available within
Ubuntu.
I tried
apt-get install
2011 Oct 12
2
Nonlinear regression aborting due to error
Colleagues,
I am fitting an Emax model using nls. The code is:
START <- list(EMAX=INITEMAX, EFFECT=INITEFFECT, C50=INITC50)
CONTROL <- list(maxiter=1000, warnOnly=T)
#FORMULA <- as.formula(YVAR ~ EMAX - EFFECT * XVAR^GAMMA / (XVAR^GAMMA + C50^GAMMA)) ## alternate version of formula
FORMULA <- as.formula(YVAR ~ EMAX - EFFECT / (1 + (C50/XVAR)^GAMMA))
FIT <-
2011 Mar 25
2
Finding the common portion of strings
Colleagues
R: 2.12.2
OS X
I have a set of text objects in the form (I am showing 3 of what is more likely to be 20 or so):
OBJECTS <- c("abcSOMETHINGCOMMONegf", "xSOMETHINGCOMMONyz", "SOMETHINGCOMMONnme")
As you can see, all contain "SOMETHINGCOMMON" and the position varies. But, I don't know what that "SOMETHINGCOMMON" is.
Is there an
2005 Jan 17
2
Question about time series
I have data in the following format:
> DATE
[1] "01/13/2004"
In order to find the difference between two data points, I presently
use brute force to calculate the day of the year:
> strptime(DATE, format="%m/%d/%Y")$yday
[1] 12
Although this works, it may not be robust over different years. I
assume that R is sufficiently clever that a much simpler approach
2003 Apr 25
1
Rcmd vs. Rterm.exe
Hi r-hackers,
What exactly is the difference in call r from a batch between this two ways:
Rterm.exe ...
Rcmd BATCH ... (I have to install perl first, I know)
I haven't found any documentation about the difference (readme, FAQs, ...).
I use rterm.exe, but is there a benefit in using rcmd?
Can you explain me that or give me a link?
Thanks
Thomas
Thomas Untern?hrer
2008 Nov 07
2
Unexpected behavior of clocktime related to daylight savings time
Colleagues,
I submitted this several days ago and no one responded, so I am trying
again, trying a different subject line:
I just encountered some unexpected behavior of difftime in
relationship to the change from daylight savings to standard time.
My understanding is that DST and ST take effect at 2AM. However, the
results below suggests that R (version 2.8.0 in OS X) implements the