Displaying 20 results from an estimated 8000 matches similar to: "table( , exclude=NULL) for factor objects"
2003 Aug 16
4
unclass
Have I been sleeping in class?
rw1071 from CRAN, windows XP
incidencia is made by a call to tapply
> class(incidencia)
[1] "array"
> incidencia <- unclass(incidencia)
> class(incidencia)
[1] "array"
Kjetil Halvorsen
2003 Jul 17
2
Minor nuisance with rw1071
Hola!
Starting with rw1071, just after starting Rgui the scope is not with
Rconsole, but some other place. This means I have to do a mouse click
in the Rconsole before starting to write the first command. Since I
always forget this, I end up writing the first command twice.
This is of course only a minor nuisance, but why is focus no longer
set to Rconsole window when start-up?
This is on
2003 Mar 21
2
rsync
Hola!
I am now downloading r-devel to compile it on windows XP. The CRAN
source code page says "you will prefere to use rsync". I am googling
around, and cannot find anything about rsync on windows.
Anybody has any experience with rsync on windows?
Kjetil
2003 Sep 02
2
identify with image
Hola!
I will want to identify pixels in an image with the mouse, for
so getting the image data from the matrix(es), for use in subsequent
discriminant analysis. But the following bombs R:
(windows XP, rw1071)
> str(baboon)
list()
- attr(*, "size")= int [1:2] 512 512
- attr(*, "cellres")= num [1:2] 1 1
- attr(*, "bbox")= num [1:4] 0 0 512 512
- attr(*,
2003 Sep 05
3
fit data with skew t distribution
Hi,
Is there a function in R that I can use to fit the data with skew t
distribution? Speaking in detail, I first used the kernel density estimation
to fit my data, then I drew the skew t using my specified location, scale,
shape, and df to make it close to the kernel density. Now I want to get the
parameter estimations of the skew t which give me the closet density to the
kernel density.
2003 Oct 12
6
Rd problems
Hola!
I have the following in a .Rd file:
\eqn{\mbox{coef} = c(\mbox{coef}[1],\ldots, \mbox{coef}[n]) }
{coef = c(coef[1], coef[2], \dots, coef[n])}
However, both arguments come out in the latex file!
Whats happening?
Kjetil Halvorsen
2004 Oct 04
4
Off-Topic: LaTeX package listings
Hola!
I ask here since I learnt from this list that the LaTeX package listings
should be good
for typesetting R code. I encountered one problem:
\begin{lstlisting}
X %*% V
\end{lstlisting}
in the output the * in %*% disappears! same with %/%, etc, the /
disappears.
Any ideas?
Kjetil
--
Kjetil Halvorsen.
Peace is the most effective weapon of mass construction.
--
2003 Aug 22
2
converting factor to numeric
Hola!
The R FAQ says:
7.12 How do I convert factors to numeric?
It may happen that when reading numeric data into R (usually, when
reading in a file), they come in as factors. If f is such a factor
object, you can use
as.numeric(as.character(f))
to get the numbers back. More efficient, but harder to remember, is
as.numeric(levels(f))[as.integer(f)]
In any case, do not call as.numeric()
2003 Nov 03
10
USA map
R users,
In S, there was a function called usa() that
would draw the map of the United States, plus
it had other options for graphics. I have looked
but I can't find the equivalent in R. Is there one?
Thanks,
Jason
2003 Jul 21
3
Confidence Band for empirical distribution function
Hi,
I was trying to draw an empirical distribution function with uniform
confidence bands. So I tried to find a way to calculate values of the
Kolmogorov-Smirnov Distribution but failed.
I guess it must be hidden somewhere (since the ks-test is implemented),
but I was unable to find it.
Is there any way to do this?
Thanks
Leif Boysen
2004 Nov 06
3
foreign(read.spss) in rw2000 and re2001beta
I encountered something strange with read.spss (package foreign, version
0.7 with R2.0.0 and
version 0.8 with R2.0.1 beta, windows XP)
I made a test file test.sav with SPSS version 11.5.1
containing only one numeric variable, with a value label
for one value not occuring in the file. According to ?read.spss
this should result in a factor, but it results in all NA. Using the
argument
2003 Nov 18
3
Copula calculation in R?
Hello
Anyone that now of any function in R that can calculate copulas?
Or if anyone have any code avaible I would be more than interested.
Thank you in advance
/Thomas
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
2004 Sep 24
2
rw2000dev: problems with library(foreign)
I get the following
> library(foreign)
Error in namespaceExport(ns, exports) : undefined exports: write.foreign
Error in library(foreign) : package/namespace load failed for 'foreign'
with rw2000dev as of (2004-09-17
Kjetil
--
Kjetil Halvorsen.
Peace is the most effective weapon of mass construction.
-- Mahdi Elmandjra
2005 May 28
3
Incompatibility with VGAM
I just discovered that when the VGAM package (not on CRAN) is loaded,
glm() doesn't work. This is because VGAM defines a family function()
which gets found
by glm() in place of the family function from stats.
Then VGAM:::family returns an object which doesn't have a $family
component, (it has a component
$vfamily).
I thought namespaces should protect us from this happening?
Kjetil
--
2004 Dec 08
2
Strange error from R CMD INSTALL
I am trying to install a local package and get this unexpected
error:
---------- Making package UMSA ------------
adding build stamp to DESCRIPTION
installing R files
installing data files
installing man source files
installing indices
Error: couldn't find function "na.omit"
Execution halted
na.omit of course is in package stats, and that is listed in the
Depends field in
2005 Mar 29
2
strange error with rw2010dev
With rw2010dev I get a strange protect(): protection stack overflow
error with a small data frame which otherwise is usable:
If anybody wants to have a look I can provide an RData file
with the problematic data frame.
Doesn't seem to be necessary, the following simulated example
generates the error:
> testmat <- matrix(1:80, 20,4)
> dim(testmat)
[1] 20 4
> str(testmat)
int
2004 Sep 17
3
Removing constants from a data frame
Suppose I have
x<-data.frame(v1=1:4, v2=c(2,4,NA,7), v3=rep(1,4),
v4=LETTERS[1:4],v5=rep('Z',4))
or a much larger frame, and I wish to test for and remove the constant
numeric columns.
I made:
is.constant<-function(x){identical(min(x),max(x))}
and
apply(x,2,is.constant) # Works for numerics
x[,-which(apply(x,2,is.constant))]
I'd really like to be able to
2003 Sep 27
3
coloring dendrgram in heatmap?
Using the heatmap function in mva, it seems to be hard to use different
colors in the edges leading to different groups of objects, as commonly done
in many heatmaps in the microarray graphics. Any suggestions? Thanks.
max
2004 Dec 31
4
R-intro
Hello!
I was reading R-intro and I have some suggestions:
R-intro.html#A-sample-session
rm(fm, fm1, lrf, x, dummy)
suggestion
rm(fm, fm1, lrf, x, y, w, dummy)
The next section will look at data from the classical experiment of Michaelson and Morley to measure the speed of light.
file.show("morley.tab")
mm <- read.table("morley.tab")
suggestion
mm <- data(morley)
2004 Aug 27
2
Packing of data files in packages
Hola!
I am writing a package with some large data files, so it would be good to
use the feature of zipping data.
However, I use .R files to read in the data from one (sometimes more)
files, so Rcmd build --zip-data
gives a package which does'nt work. How should I do it, is it better ti
zip each data file individually and use the functions to read from
zipped files, or are there some other