Displaying 20 results from an estimated 6000 matches similar to: "Histogram"
2012 Mar 13
2
beginner's loop issue
Dear All,
I hope you don't mind helping me with this small issue. I haven't been using
R in years and I'm trying to fill in a matrix
with the output of a function (I'm probably using the Matlab logic here and
it's not working).
Here is my code:
for (i in 1:length(input)){
out[i,1:3] <- MyFunction(input[i,1],input[i,2], input[i,3])
out[i,4:6] <-
2009 Jul 07
2
rle
Hallo,
I have an other problem, I have this vector signData with an alternation of
1 and -1 that corrispond to the duration of two different percepts. I
extracted the durations like this:
signData<- scan("dataTR10.txt")
dur<-rle(signData)$length
Now I would like to extract only the positive duration, e.g.
signData <- c(1,1,1,1,-1,-1,-1,1,1,-1,-1)
posduration <- c(4,2)
I
2009 Apr 29
3
mode(x) <- "double"
Hi,
I need your help!!
I imported a big coloumn vector from a txt file but it results as mode
:"list" I want to change it in numeric otherwise I can't do my analysis.
This is what i get:
mode (data) <- "double"
Error in eval(expr, envir, enclos) :
(list) object cannot be coerced to type 'double'
>
Thanks a lot!!!
Alessandra
--
View this message in
2009 Jun 29
2
re moving value from a vector
Hallo,
I have a vector of several iterations and I have to remove /filter out all
the values < than 10,
how can I do this?
Thanks a lot
Alessandra
--
View this message in context: http://www.nabble.com/removing-value-from-a-vector-tp24250608p24250608.html
Sent from the R help mailing list archive at Nabble.com.
2010 Jun 07
2
as.integer
Hi,
Is there a way to recursively change the variables imported with
read.table(..) - and then attached with attach(..) - from as.factor to
as.integer?
I have about 9 variables that are now recognized as factors but I need to do
statistics on them so I need to change them in as.integer. It works, but I
wonder if there is a way to to this for all the variables in one go.
Thanks a lot for your
2006 Sep 06
4
histogram in the background?
I intend to draw a plot of y against x. In the background of this graph I
wish to creat a histogram of the horizontal variable x. Does any expert know
how to produce such a plot?
[[alternative HTML version deleted]]
2012 Jun 05
1
Fourier descriptors created in a loop
Hi All,
Here is the problem: I'm trying to generate a number of Fourier Descriptors
figures for an experiment.
All I need is that they are created within a loop and saved with sequential
names (e.g., s1_1.png, s1_2.png etc..) in my directory.
I created a nested loop with a counter for the different amplitudes for the
actual shapes and a counter for the file names.
This script:
*count
2010 Feb 19
3
plot circular histogram
In conducting studies of animal orientation and displacement, I need to
produce circular histograms of angles (bearings in radians 0-2pi) where the
centre of the circle indicates very few observations for a given bin of
angles and outwardly concentric circles indicate greater frequencies of
observations for a given bin of angles. I'd like not to have to write the
function myself but I
2012 Jul 05
3
Histogram
I have a column of 1000 datapoints from the normal distribution with mean 2
and variance 4. How can I get a histogram of these observations with 20
bins with each bin having 50 observations?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
2012 Aug 31
1
Histogram to KDE
Hello,
I wanted to know if there was way to convert a histogram of a data-set to a
kernel density estimate directly in R ?
Specifically, I have a histogram [bins, counts] of samples {X1 ...
XN} of a quantized variable X where there is one bin for each level of X,
and I'ld like to directly get a kde estimate of the pdf of X from the
histogram. Therefore, there is no additional quantization of
2010 Sep 16
3
Help with customizing a histogram figure
Hi all,
Please consider the following code:
require(plotrix)
l <- list(rnorm(50),rnorm(50,sd=2),rnorm(50,mean=3))
multhist(l)
I have two things I need help with:
(1) In the output, there are empty spaces on the x-axis. How would I eliminate
these spaces? I want a nice, smooth, empty-spaceless x-axis.
(2) How could I add tracing lines to each histogram? I am undoubtedly using the
wrong
2009 Aug 20
2
Histogram problem
I'm trying to create a histogram from the following code, but my data keeps
adding the Num vector and plotting that. My data in the CSV file is just
one vector. Does anyone know why?
Thanks
Conrad
SPXdf = data.frame(read.csv(file = "SPX.csv", header = TRUE, sep = ",", dec
= ".", fill = TRUE))
Max = max(SPXdf[,2])
Min = min(SPXdf[,2])
Count =
2006 Jun 08
3
Re-binning histogram data
Hi,
Short Version:
Is there a function to re-bin a histogram to new, broader bins?
Long version: I'm trying to create a histogram, however my input-data is
itself in the form of a fine-grained histogram, i.e. numbers of counts
in regular one-second bins. I want to produce a histogram of, say,
10-minute bins (though possibly irregular bins also).
I suppose I could re-create a data set as
2013 Feb 08
2
Count of Histogram Bins using Shingles with lattice
I know that I can get a count of histogram bins in base R with plot=FALSE. However, I'd like to do the same thing with lattice. The problem is that I've set up shingles, and I'd like to get the count within each bin within each shingle. plot=FALSE doesn't seem to do it.
[[alternative HTML version deleted]]
2012 Dec 06
2
Best way to coerce numerical data to a predetermined histogram bin?
Folks:
Say I have a set of histogram breaks:
breaks=c(1:10,15)
# With bin ids:
bin_ids=1:(length(breaks)-1)
# and some data (note that some of it falls outside the breaks:
data=runif(min=1,max=20,n=100)
***
What is the MOST EFFICIENT way to "classify" data into the histogram bins
(return the bin_ids) and, say, return NA if the value falls outside of the
bins.
By classify, I mean
2005 Nov 03
1
How to calculate errors in histogram values
Hi there,
I'm new to R but I thought this is the most likely place I could get advice or
hints w.r.t the following problem:
I have a series of measurements xi with associated uncertainties dxi. I would
like to construct the probability density histogram of this data where each
density estimate has an associated error that is derived from the dxi. In
other words, for large dxi the
2009 Jan 27
1
3-axis Barplots (plus qplot like staked histogram capability)
Searched my R reference docs*, and the Rseek, but evidently I've overlooked this capabilty.
Is it possible to produce a 3d Barplot using R?
For example would like to have a three axis bar plot - \
x-axis = location(discrete),
y-axis = data value,
z-axis = frequency of value occurance (of location and value)
Would also if could also do something like what "qplot" allows,
2003 Jul 03
4
Generating a vector for breaks in a histogram
Hi
I have two lots of numbers which I would like to histogram using the hist() function. For comparative reasons, I want them to be on the same scale, which I can use the xlim and ylim options to achieve.
However, having them on the same scale is meaningless unless they have the same "breaks". Consulting the documentation, there are 4 ways of defining the number of breaks, only one
2012 Jul 10
2
Changing x-axis values displayed on histogram
Is it possible to change the x-axis values in a histogram to reflect binned
values?
Here are my data:
histexample<-c(6,7,7,8,8,8,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,12,12,12,12,13,13,13,14,14,14,15,16)
hist(histexample)
Now, I'll bin pairs of adjacent values together (e.g., 5-6, 7-8, 9-10,
11-12, 13-14, 15-16) using the following
bins<-c(4.5,6.5,8.5,10.5,12.5,14.5,16.5)
2009 Apr 22
1
converting histogram to barchart
Hi list,
After a lot of tweaking i have managed to create a histogram with an
overlaying density plot. The histogram shows a sample of birth weights
of babies and the density plot shows birth weights from a much larger
reference populaton. My data is divided in 0.1 Kg bins so in the code
below binweigh=0.1.
The trouble with the current graph is that it is not very clear since
the density plot