Displaying 20 results from an estimated 20000 matches similar to: "Extracting bins and frequencies from frequency table"
2010 Sep 21
5
Combined plot: Scatter + density plot
Hi,
in order to save space for a publication, it would be nice to have a
combined scatter and density plot similar to what is shows on
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=78
I wonder if anybody perhaps has already developed code for this and is
willing to share. This is the reproducible code for the histogram
version obtained from the site:
def.par <-
2010 Jun 24
8
Install package automatically if not there?
Hi fans,
is it possible for a script to check if a library has been installed?
I want to automatically install it if it is missing to avoid scripts
to crash when running on a new machine...
Ralf
2010 Jul 29
2
Reset R environment through R command
Is it possible to remove all variables in the current environment
through a R command.
Here is what I want:
x <- 5
y < 10:20
reset()
print(x)
print(y)
Output should be NULL for x and y, and not 5 and 10:20.
Can one do that in R?
Best,
Ralf
2010 Mar 02
16
Three most useful R package
Hi R-fans,
I would like put out a question to all R users on this list and hope
it will create some feedback and discussion.
1) What are your 3 most useful R package? and
2) What R package do you still miss and why do you think it would make
a useful addition?
Pulling answers together for these questions will serve as a guide for
new users and help people who just want to get a hint where to
2010 Oct 06
5
Create variable by name
Can one create a variable through a function by name
createVariable <- function(name) {
outputVariable = name
name <- NULL
}
after calling
createVariable("myVar")
I would like to have a variable myVar initialized with NULL in my
environment. Is this possible?
Ralf
2010 Aug 04
3
Output (graphics and table/text)
Hi R Users,
I need to produce a simple report consisting of some graphs and a
statistic. Here simplification of it:
# graphics output test
a <- c(1,3,2,1,4)
b <- c(2,1,1,1,2)
c <- c(4,7,2,4,5)
d <- rnorm(500)
e <- rnorm(600)
op <- par(mfrow=c(3,2))
pie(a)
pie(b)
pie(c)
text(ks.test(d,e))
obviously, the ks.test does not make it to the output. How can this be
archived by a)
2010 May 06
3
Intersection list
How can I create intersections of vectors?
a <- c(1,2,3)
b <- c(1,5,6)
the intersected list c should contain c(1)...
Ralf
2010 Jul 29
3
Statistical mailing list
I am looking for a mailing list for general statistical questions that
are not R related. Do you have any suggestions for lists that are busy
and helpful and/or lists that you use and recommend?
Thanks in advance,
Ralf
2010 Oct 06
3
Source awareness?
Here the general (perhaps silly question) first: Is it possible for a
script to find out if it was sourced by another script or run
directly?
Here a small example with two scripts:
# script A
print ("This is script A")
# script B
source("C:/scriptA.R")
print ("This is script B")
I would like to modify script A in a way so that it only outputs 'This
is script
2010 Aug 04
4
Adding collumn to existing data frame
Hi experts,
I am trying to write a very flexible method that allows me to add a
new column to an existing data frame. This is what I have so far:
add.column <- function(df, new.col, name) {
n.row <- dim(df)[1]
length(new.col) <- n.row
names(new.col) <- name
return(cbind(df, new.col))
}
df <- NULL
df <- data.frame(a=c(1,2,3))
df
# corect: added NA to new collumn
df <-
2010 Jun 24
4
Simple qqplot question
I am a beginner in R, so please don't step on me if this is too
simple. I have two data sets datax and datay for which I created a
qqplot
qqplot(datax,datay)
but now I want a line that indicates the perfect match so that I can
see how much the plot diverts from the ideal. This ideal however is
not normal, so I think qqnorm and qqline cannot be applied.
Perhaps you can help?
Ralf
2010 Jul 09
3
Non-parametric regression
I have two data sets, each a vector of 1000 numbers, each vector
representing a distribution (i.e. 1000 numbers each of which
representing a frequency at one point on a scale between 1 and 1000).
For similfication, here an short version with only 5 points.
a <- c(8,10,8,12,4)
b <- c(7,11,8,10,5)
Leaving the obvious discussion about causality aside fro a moment, I
would like to see how
2010 May 11
3
Smoothing Techniques - short stepwise functions with spikes
R Friends,
I have data from which I would like to learn a more general
(smoothened) trend by applying data smoothing methods. Data points
follow a positive stepwise function.
| x
x
| xxxxxxxx xxxxxxxx
| x x
|xxxx xxx xxxx
| xxxxxxxxxxxxxxxxx
|
|
2010 Jul 05
1
Profiler for R ? (HFWUtils package)
> Message: 21
> Date: Mon, 5 Jul 2010 02:26:29 -0400
> From: Ralf B <ralf.bierig at gmail.com>
> To: "r-help at r-project.org" <r-help at r-project.org>
> Subject: [R] Profiler for R ?
>
> Hi,
>
> is there such a thing as a profiler for R that informs about a) how
> much processing time is used by particular functions and commands and
> b) how
2008 Jul 22
2
Table orderd by frequencies
Dear List,
I try to order the output of a table by the frequencies of the vector I
am look at.
The object I am looking at is a factor with a lot of levels that were
named only once.
Therefore it would be much easier to order the output by the frequencies
of the levels.
E.g.
> levels(a)
"a" "b" "c" "d"
Preferred outcome:
table(a)
b c a d
10 5 1 1
2009 May 09
2
Histogram frequencies with a normal pdf curve overlay
Dear List,
When I plot a histogram with 'freq=FALSE' and overlay the histogram
with a normal pdf curve, everything looks as expected, as follows:
x <- rnorm(1000)
hist(x, freq=FALSE)
curve(dnorm(x), add=TRUE, col="blue")
What do I need to do if I want to show the frequencies (freq=TRUE)
with the same normal pdf overlay, so that the plot would still look
the same?
Regards,
2010 May 08
2
Machine Learning and R
Hi all,
I am looking for a good book that covers Machine Learning as a whole
and provides examples in R while not over focusing on the math (such
as in 'Elements of Statistical Learning') but rather on descriptions
and examples. I am relatively new to R and ML and, while solving
problems with R, I want to learn the main concepts, techniques and
problem categories. Can anybody here
2010 Sep 23
3
Length of vector without NA's
Hi,
this following code:
x<-c(1,2,NA)
length(x)
returns 3, correctly counting numbers as well as NA's. How can I
exclude NA's from this count?
Ralf
2010 Jul 09
3
Plotting text in existing plot?
I would like to plot some text in a existing plot graph. Is there a
very simple way to do that. It does not need to be pretty at all (just
maybe a way to center it or define a position within the plot). ( ? )
Ralf
2011 Aug 21
1
Histogram from frequency data in pre-made bins
Dear R user,
I am using UK census data on travel to work. The authorities have provided a
breakdown in each area by mode (car, bicycle etc.) and distance travelled (0
? 2 km, 2 ? 5 km etc). Therefore, after processing, the data for Sheffield
look like this https://files.one.ubuntu.com/ej2VtVbJTEaelvMRlsocRg :
dshef <- read.table("distmodesheff.csv", sep=",", header=TRUE)