Displaying 20 results from an estimated 400 matches similar to: "R optim() function"
2012 Jan 19
1
converting a for loop into a foreach loop
Dear all,
Just wondering if someone could help me out converting my code from a for()
loop into a foreach() loop or using one of the apply() function. I have a
very large dataset and so I'm hoping to make use of a parallel backend to
speed up the processing time. I'm having trouble getting selecting three
variables in the dataset to use in the foreach() loops. My for() loop code
is:
2014 Jul 07
2
a question about optim.R and optim.c in R
Hi, I am learning R by reading R source code. Here is one question I have
about the optim function in R.
The context : In the optim.R, after all the prep steps, the main function
call call is made via :
.External2(C_optim, par, fn1, gr1, method, con, lower, upper).
So, it seems to me, to follow what is going on from here, that I should
read the optim function in \src\library\stats\src\optim.c
2009 Nov 26
2
Export kde object as shapefile
I am trying to estimate home range size using the plug-in method with kernel
density estimation in the kernel smoothing (ks) package. Unless there is
another way I am not familiar with, in order to calculate spatial area under
the space I need to convert my kde () object into a spatial object somehow
in order to calculate its spatial area. Could someone demonstrate how this
might be done?
--
2008 Aug 25
2
Large Data Set Help
I am attempting to perform some simple data manipulation on a large data
set. I have a snippet of the whole data set, and my small snippet is 2GB in
CSV.
Is there a way I can read my csv, select a few columns, and write it to an
output file in real time? This is what I do right now to a small test file:
data <- read.csv('data.csv', header = FALSE)
data_filter <- data[c(1,3,4)]
2012 Nov 03
1
Violin plot of categorical/binned data
Hi,
I'm trying to create a plot showing the density distribution of some
shipping data. I like the look of violin plots, but my data is not
continuous but rather binned and I want to make sure its binned nature (not
smooth) is apparent in the final plot. So for example, I have the number of
individuals per vessel, but rather than having the actual number of
individuals I have data in the
2013 Mar 11
1
Distribution plus background fitting
Hi All,
I apologise if this question has been answered before, but my background is
a little different from most people using R, and the language we use seems
to be different! I am trying to analyse some nuclear physics data, which
consists of an ensemble of "energy" readings in a detector that, when
binned, form a number of Gaussian shaped peaks superimposed on a varying
background
2012 Mar 14
1
How to use ggplot to do the binned quantile plots(one type of scatter plot)?
How to use ggplot to do the binned quantile plots(one type of scatter plot)?
Hi all,
I have done scatter plot: plot(x, y).
Now I wanted to do binned quantile plots... can ggplot2 help me?
For example, we bin x data into 10 bins.
For each bin, we draw the 10 deciles of the corresponding y data in that
bin as points/dots.
And then accross all bins, we would like to connect the corresponding
2010 Jun 18
4
Root mean square on binned GAM results
Hi,
Standard correlations (Pearson's, Spearman's, Kendall's Tau) do not
accurately reflect how closely the model (GAM) fits the data. I was told
that the accuracy of the correlation can be improved using a root mean
square deviation (RMSD) calculation on binned data.
For example, let 'o' be the real, observed data and 'm' be the model data. I
believe I can calculate
2010 Dec 09
1
Bivariate kernel density bandwidth selection
I've been trying to implement bivariate kernel density estimation. For data
like mine, function "kde" from package "ks" with bandwidth matrix derived by
function "Hscv" seems like a very good choice. Unfortunately, Hscv seems
unmanageably slow except for very small sample sizes (up to a few hundred)
and my sample sizes are quite large (up to a few thousand).
2018 Feb 22
5
Which CDR processing for high load ?
Hello,
I'm load testing a new Asterisk 13 system (Debian Stretch, packaged
asterisk).
One system writes CDR though an ODBC connection to a local Postgres
database over the LAN.
When sending 50 new calls per second with SIPp, I'm seeing one system
outputs :
taskprocessor.c: The 'subm:cdr_engine-00000003' task processor queue
reached 5000 scheduled tasks again.
This [1] thread
2009 Feb 18
1
Plotting Binned Data
Dear all,
I have a binned data that looks like this:
> dat
(-1,9] (9,19] (19,29] (29,39] (39,49] (49,59] (59,69] (69,79]
10063374 79 16 4 3 4 4 3
(79,89] (89,99]
6 2
I tried to plot a histogram overlayed with curve.
With the following snippet:
library(lattice)
pdf("myfile.pdf")
hist(dat)
2007 Jul 20
3
binned column in a data.frame
Dear all,
I would like to know how can I create a binned column in a data.frame. The output that I would like is something like this:
Start Binned_Start
1 0-5
2 0-5
6 5-10
8 5-10
13 10-15
...
Best regards
João Fadista
Ph.d. student
UNIVERSITY OF AARHUS
Faculty of Agricultural Sciences
Dept. of Genetics and Biotechnology
Blichers
2006 Jun 12
2
Fitting Distributions Directly From a Histogram
Dear All,
A simple question: packages like fitdistr should be ideal to analyze
samples of data taken from a univariate distribution, but what if
rather than the raw data of the observations you are given directly
and only a histogram?
I was thinking about generating artificially a set of data
corresponding to the counts binned in the histogram, but this sounds
too cumbersome.
Another question is
2007 Feb 12
0
[PATCH] lift physical address restriction in svae/restore code
Bump this to 44 bits for x86-32 and 52 bits for x86-64.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Index: 2007-02-07/tools/libxc/xc_linux_restore.c
===================================================================
--- 2007-02-07.orig/tools/libxc/xc_linux_restore.c 2007-01-17 11:16:20.000000000 +0100
+++ 2007-02-07/tools/libxc/xc_linux_restore.c 2007-02-12 09:06:05.000000000 +0100
2007 Sep 25
2
3d barplot in rgl
Is there anyway to plot a matrix using a 3d bar plot. Something like
bar3 in matlab?
The example in demo hist3d does a 3d barplot for binned data, but has
anyone tried something for a simple matrix with spaces betwen bars
and axis labels using matrix dimnames or 1,2,3?
stages<-letters[1:3]
A<-matrix(c(
0.21, 0.21,0.03,
0.55, 0.58, 0.09,
1.30, 1.35, 0.22), nrow=3, byrow=TRUE,
2009 Feb 03
3
Boxplots by variable
Dear R users,
I have a matrix "final" which looks like this:
final
oSO4 oNO3 mSO4 mNO3
[1,] 3.3728 0.2110 1.9517421 1.01883602
[2,] 0.8249 0.0697 1.5970292 0.11368781
[3,] 0.2636 0.1004 0.6012445 0.24356332
[4,] 8.0072 0.3443 6.1016998 3.63207149
[5,] 13.5079 0.6593 12.4011068 1.55323386
[6,] 6.1293 0.1989 5.7620926 0.12884845
[7,] 0.6004 0.0661
2003 Sep 14
1
estimating quantiles from binned data
Suppose I have a set of binned data, counts exceeding a series of
arbitrary thresholds, a total N, a minimum and maximum, those sorts of
things. Is there a "standard" method for estimating arbitrary
quantiles from this?
My initial thought is that the counts and min/max give me solutions at
various points along the empirical cdf. As the data are roughly
log-normal, I thought maybe I
2009 Dec 04
1
Distribution fitting with binned data
Hello
I need to fit a distribution to a histogram data set. I have read
Ricci's guide to distribution fitting, and am ready to begin
experimenting with the techniques it mentions, but I am uncertain how to
get my data in the format he uses.
My problem is that my data is binned. So for example my data is in
the following format
#lb ub count
0 1 4
1 2 7
2 3 2
2012 Oct 03
3
Fastest non-overlapping binning mean function out there?
Hi,
I'm looking for a super-duper fast mean/sum binning implementation
available in R, and before implementing z = binnedMeans(x y) in native
code myself, does any one know of an existing function/package for
this? I'm sure it already exists. So, given data (x,y) and B bins
bx[1] < bx[2] < ... < bx[B] < bx[B+1], I'd like to calculate the
binned means (or sums)
2009 Nov 13
2
data frame subsets?
Hello,
I am trying to create data frame subsets based on binned temperature
data. I have code working to create the bins (d.1 and d.2), but it
takes two steps, I was wondering if I could merge into one step. See Below
d
n year mo da hr t td tw rh kPa
1 1 1945 3 1 0 1.1 0.0 0.6 92 101.7
2 2 1945 3 1 1 2.8 -1.1 1.1 76 101.8
3 3 1945 3 1 2 2.2 -1.7 0.6 75 101.9
4 4