Displaying 20 results from an estimated 100 matches similar to: "converting a for loop into a foreach loop"
2020 Oct 28
2
R optim() function
Hi R-Help,
I am using R to do functional outlier detection (using PCA to reduce to 2 dimensions - the functional boxplot methodology used in the Rainbow package), and using Hscv.diag function to calculate the bandwidth matrix where this line of code is run:
result <- optim(diag(Hstart), scv.mat.temp, method = "Nelder-Mead", control = list(trace = as.numeric(verbose)))
Within the
2008 Jul 31
2
S 3 generic method consistency warning please help
I would like to include this in a package. The S3 methods on R CMD check
says
* checking S3 generic/method consistency ... WARNING
window:
function(x, ...)
window.chron:
function(data, day1, hour1, day2, hour2, ...)
See section 'Generic functions and methods' of the 'Writing R Extensions'
manual.
I have looked and can not figure it out. This function is for convience.
What
2013 Jan 17
1
plotting from dataframes
thanks to your guys help I am closer to solving my problem but I have some
small problem. So let's say I start with
>data
number day hour
1 17 10
2 17 11
3 17 6
4 18 4
5 18 10
6 19 8
7 19 8
I want to split to odd days, which I am able to do, I call this object
frames, which looks like:
> frames
$`1`
c1 day1 hour1
1 1 17 10
2 2 17 11
3 3 17 6
$`2`
c1 day1
2010 Apr 21
2
Table to List Transformation Scenario
I have a series of tables, one for each environment indicating a date (row)
and a sample at each hour of the day (0 to 23)
Test1 Table:
Date,Hour1,Hour2,...Hour23
1/1/10,123,123,...,123
I would like to model this as a time series but how can I translate the
table into a list such that I can get:
1/1/10 00:00, 123
1/1/10 01:00, 123
1/1/10 02:00, 123
...
1/1/10 23:00, 123
Any suggestions on how
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)]
2004 Jan 22
1
stem plot problem with the mtcars data (PR#6453)
Full_Name: Liming Liang
Version: 1.8.1
OS: windows2000 professional
Submission from: (NULL) (67.172.81.139)
I was looking at the variable 'mpg' of the data file 'mtcars' and make a stem
plot, the following is the commend I entered. The stem plot shows the largest
observation is 32.9 but actually in the data the largest observation is 33.9,
here might be a problem.
>
2009 Feb 18
2
Added system Info:--Segmentation Fault occured while connecting to the database
Hi All,
Wanted to add some more information ,regarding my problem.
configuration of teh OS and R:---
Linux 2.6.18-6-686
> R.Version()
$platform
[1] "i486-pc-linux-gnu"
$arch
[1] "i486"
$os
[1] "linux-gnu"
$system
[1] "i486, linux-gnu"
$status
[1] "Patched"
$major
[1] "2"
$minor
[1] "4.0"
$year
[1] "2006"
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
2004 Aug 03
2
attach data from tapply to dataframe
I am working with a longitudinal data set in the long format. This data
set has three observations per grade level per year. Here are the first
10 rows of the data frame:
>tenn.dat[1:10,]
year schid type grade gain se new cohort
6 2001 100005 5 4 33.1 3.5 4 3
7 2002 100005 5 4 33.9 3.9 4 2
8 2003 100005 5 4 32.3 4.2 4 1
10 2001 100005
2010 Jun 02
2
Faster union of polygons?
Dear R-helpers,
thanks for yesterday's speeding-up tip. Here is my next query:
I have lots of polygons (not necessarily convex ones, and they never
have holes) given by x,y coordinates.
I want to get the polygon that is the union of these polygons. This is
my current method, but I am hoping there is a faster method (up to
thousands of polygons, each with ca. 40 xy points).
Example:
2007 Mar 07
1
Sweave issue: quotes in verbatim-like output print incorrectly
Hi all
I love Sweave; use it all the time.
But I recently received a new computer, and ever since I
have had a problem I've never seen before.
For example, I place the following in my Snw file:
<<>>=
sms <-
read.table("http://www.sci.usq.edu.au/staff/dunn/Datasets/applications/popular/smsspeed.dat",
header=TRUE)
attach(sms)
sms.lm <- lm( Time ~ Age*Phone,
2014 May 13
1
Performance tests of the current version (git-b1b6caf)
Current sources (git-b1b6caf) were compiled with GCC 4.8.2 and GCC 4.9.0
with various -msseN options (the default is -msse2). Then I took two WAV
files (one is 16-bit and the other is 24-bit) and compressed them using
best compression mode. The results are in the table below.
(please remember that the resulting value is an encoding time, not encoding speed)
CPU: Intel Core i7 950 (up to SSE4.2)
2007 May 12
2
Implicit vs explicit printing and the call stack
Hi everyone,
I've run into a bit of strange problem with implicit vs explicit
printing and the call stack. I've included an example at the bottom of
this email. The basic problem is that I have an S3 object with a
print method. When the object is implicitly printed (ie. typed
directly into the console) the function arguments in the call stack
are exploded out to their actual values,
2013 Jul 17
2
error message in gev
Hi r-users,
I would like to use gev and my data (annual rainfall ) is as follows:
> head(dat,20) A B C D E F G H I J
1 45.1 41.5 58.5 50.1 46.0 49.1 37.7 49.1 59.8 54.0
2 50.3 39.8 49.4 56.4 49.4 48.8 42.1 49.8 49.4 58.3
3 41.7 39.3 44.6 39.1 35.7 41.5 40.8 40.8 38.5 45.6
4 50.7 33.9 48.4 28.2 35.5 39.1 61.4 17.0 30.7 38.3
5 39.3 30.6 46.9 23.8 25.8
2003 Dec 05
1
Can anyone help me reproduce this SAS Mixed output??
I asked this before and I am going to try again in more applied terms. I
am trying to use R to extract variance components for a two-factor random
effects model with both factors crossed. It would also be nice to
generate some confidence intervals as well. For example, a data set
using SAS Proc Mixed is below followed by the four variance component
estimates and the respective confidence
2009 Nov 26
2
Testing for strength of fit using R
Dear all,
I am trying to validate a model by comparing simulated output values against observed values. I have produced a simple X-y scatter plot with a 1:1 line, so that the closer the points fall to this line, the better the 'fit' between the modelled data and the observation data.
I am now attempting to quantify the strength of this fit by using a statistical test in R. I am no
2017 Oct 10
2
small files performance
2017-10-10 8:25 GMT+02:00 Karan Sandha <ksandha at redhat.com>:
> Hi Gandalf,
>
> We have multiple tuning to do for small-files which decrease the time for
> negative lookups , meta-data caching, parallel readdir. Bumping the server
> and client event threads will help you out in increasing the small file
> performance.
>
> gluster v set <vol-name> group
2018 Sep 13
0
CEEA-2018:2675 CentOS 6 microcode_ctl Enhancement Update
CentOS Errata and Enhancement Advisory 2018:2675
Upstream details at : https://access.redhat.com/errata/RHEA-2018:2675
The following updated files have been uploaded and are currently
syncing to the mirrors: ( sha256sum Filename )
i386:
6d40eac28340c2041aea1775a75ec383b7f780ca639adfe80af7e4bf792f87ef microcode_ctl-1.17-33.9.el6_10.i686.rpm
x86_64: