Displaying 20 results from an estimated 40000 matches similar to: "Existence of formal arguments."
2010 Feb 28
6
A slight trap in read.table/read.csv.
I had occasion recently to read in a one-line *.csv file that
looked like:
"CandidateName","NSN","Ethnicity","dob","gender"
"Smith, Mary Jane",111222333,"E","2/25/1989","F"
That "F" (for female) in the last field got transformed to
FALSE. Apparently read.csv (and hence read.table) are inferring
2009 Feb 03
1
Package manuals.
When I create a manual for a package that I create and use locally,
e.g. via
R CMD Rd2dvi --pdf foo
where ``foo'' is the name of the directory containing the source for
the package (also named ``foo'') the resulting manual does not appear
to have an index.
The package.pdf files appearing on CRAN all seem to have indices.
What must
I do to get an index appended to the
2016 Mar 06
2
Problem installing R-devel dated 4 March 2016.
Thanks Peter. I tried running the uninstalled R; it worked. I checked
on the existence of FAQ, etc. --- yep everything was there. I don't
know about over-zealous virus checkers; I haven't overtly installed any
such.
So, mystified, I started all over again from scratch. This time it
worked; seamlessly.
Totally mysterious. Story of my life. Be that as it were, all systems
are go
2008 Oct 24
4
Mail server problem?
I keep getting repeated copies of ``R-help post acknowledgements'' in
respect
of a couple of postings that I made to the list this morning (my time).
I only posted each posting *once*. I hope that others are not getting
repeated copies of my postings .... I mean I *know* my postings are so
wonderful they merit re-reading, but one does not need another copy
in order
to re-read! :-)
2001 Nov 02
3
Testing for the existence of a file.
Is there any way to do this (test for the existence of a file)
in R? In Splus (3.4) I can do
unix(paste("test -r", fnm), output = F)
where ``fnm'' is a character string giving the pathname of the file.
This returns 0 if the file exists and 256 if it doesn't.
I thought in R to do something like
system(paste("test -r", fnm), intern =T)
but this
2009 Nov 03
1
Two questions about cloud().
(1) Is there a (simple) way of getting cloud() to do *both*
type="p" and type="h"? I.e. of getting it to plot the points
as points *and* drop a perpendicular line to the underlying plane?
(2) Is there a way of telling cloud() to drop its lines to the
floor of the bounding box, rather than to the plane z=0?
I thought that the "zero.scaled" argument (for
2008 Oct 29
1
how can I access parts of yags output
Here is an example given from
?yags
library(methods)
data(stackloss)
Y1 <- yags(stack.loss~Air.Flow,id=1:21, data=stackloss)
How can I access parts of the output.
I tried:
> str(Y1)
Formal class 'yagsResult' [package "yags"] with 25 slots
..@ coefficients : num [1:2] -44.13 1.02
..@ coefnames : chr(0)
> Y1$coefnames
Error in Y1$coefnames : $
2009 Nov 24
1
The "lib" argument in install.packages().
I was flummoxed for a long time by errors generated when I did
something like
install.packages(foo,lib="Rlib")
where ``Rlib'' is my personalized directory of R packages, which
lives in my home directory (from which I started R before issuing
the foregoing install.packages() call.
Recently someone (I forget who, but thanks very much to whomever
it was) pointed out that I
2008 Feb 20
2
Data frame with 0 rows.
For reasons best known only to myself ( :-) ) I wish to create a data
frame with 0 rows and 9 columns.
The best I've been able to come up with is:
junk <- as.data.frame(matrix(0,nrow=0,ncol=9))
Is there a sexier way?
cheers,
Rolf
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
2010 Jan 18
2
An argument processing puzzle.
I have been trying to write a function mv(a,b) to move an
object a to object b. It returns no value, but only
exists for this side effect. Basically it just does
b <- a; rm(a). With some checking and prompting about
over-writing.
The thing is, I'd like to be able to use either call by
name or call by value syntax. I.e. I want to set up my
argument processing so that
mv(a,b)
2008 Oct 08
2
Histogram colours in lattice.
I am trying to do a histogram lattice plot and I would like the
histogram to be filled with a different colour in each panel.
Note: I want every bar in each histogram to be the same colour,
but that there should be different colours *between* histograms.
Can't seem to get this to work. I thought that something like
the following would be a goer:
set.seed(42)
X <- rnorm(200)
A <-
2009 Sep 27
2
Determining name of calling function.
I have vague recollections of seeing this question discussed on r-help
previously, but I can't find the relevant postings.
I want to determine (from within a given function) the name of the
function
calling that given function.
E.g. if I have a function foo() which calls a function bar(), and also
a function clyde() which calls bar(), I want to have, in the code of
bar(),
an instruction
2016 Mar 05
2
Problem installing R-devel data 4 March 2016.
I am trying to install the latest development version of R so as to be
able to perform a package check according the rules specified for CRAN.
I performed the following steps:
(1) Downloaded R-devel.tar.gz, dated 04-Mar-2016 03:21, from CRAN
(2) Upacked.
(3) Created directory "BldDir" next to the directory "R-devel".
(4) Changed directories to BldDir.
(5) Executed
2008 Aug 14
2
Department of Redundancy Department.
I just noticed a certain ``usage'' in a recent posting, and couldn't
restrain my self from commenting. The usage was of the form
``if(X==TRUE)''
where X was a logical variable.
This sort of thing is brought to you by your Department of Redundancy
Department. The ``==TRUE'' bit is irrelevant, incompetent, and
immaterial,
as Perry Mason used to say. The value of
2010 Aug 22
1
fortune? (was: Re: How do you make a formal "feature" request?)
Dear all
I was wondering whether such a long post could be fortune-ed. What do you think?
Regards
Liviu
On Sat, Aug 21, 2010 at 9:33 PM, Sharpie <chuck at sharpsteen.net> wrote:
> Well, I can think of three ways it can go down:
>
>
> 1. ?You want a shiny new pony.
>
> You ask about it on the mailing list and it seems that everyone else in the
> world responds
2008 Sep 10
2
RSiteSearch for words ``as one entity''.
I tried to search for a string of words ``as one entity'' following the
example in the help file:
> RSiteSearch("{logistic regression}")
and got the error message:
2008-09-11 08:55:41.356 open[823] No such file: /Users/rturner/http:/
search.r-project.org/cgi-bin/namazu.cgi?query={logistic+regression}
2007 Nov 05
3
Hmisc for Mac OSX.
I'm not sure if this is the right target to which to direct this post,
but I couldn't think of anything more appropriate.
I just downloaded the Hmisc package to the Imac that I use. When I
attempted
to load it I got an error to the effect that it could not load the
library:
/Library/Frameworks/R.framework/Versions/2.5/Resources/lib/
libgfortran.2.dylib
Note the ``2.5'' in
2012 Nov 09
3
if between 500-600 give 550
I have a data frame somewhat like this:
myframe <- data.frame (ID=c(2,3,4,5), Hunger =c(415,452,550,318 ))
myframe
Now I would like to add a column to the right which summarizes the values
for Hunger somewhat to reduce the number of values: If the values for Hunger
are between
300-400 I would like to insert the number 350,
between
400-500 insert 450
between
500-600 insert 550
Does
2009 Jul 28
2
A hiccup when using anova on gam() fits.
I stumbled across a mild glitch when trying to compare the
result of gam() fitting with the result of lm() fitting.
The following code demonstrates the problem:
library(gam)
x <- rep(1:10,10)
set.seed(42)
y <- rnorm(100)
fit1 <- lm(y~x)
fit2 <- gam(y~lo(x))
fit3 <- lm(y~factor(x))
print(anova(fit1,fit2)) # No worries.
print(anova(fit1,fit3)) # Likewise.
print(anova(fit2,fit3)) #
2008 Jul 01
1
Messge ``no visible binding''.
I have written a function make.fun(), which I keep in my personal
``miscellaneous'' package. It searches the current working directory
for files named ``*.R'' and sources them if their modification date
is later than the date stored in ``.Last.make.date''. (The variable
.Last.make.date then gets updated.) The function checks whether
.Last.make.date exists before