Displaying 20 results from an estimated 10000 matches similar to: "write.csv with append = TRUE"
2012 Oct 10
2
Summary using by() returns character arrays in a list
I use by() to generate a summary statistics like so:
Lbys <- by(dat[Nidx], dat$LipTest, summary)
where Nidx is an index vector with names picking out the columns in the
data frame dat.
This returns a list of character arrays (see below for str() output) where
the columns are named correctly but the rownames are empty strings and the
values are strings prepended with the summary
2010 Sep 22
2
plot.ts versus plot.zoo
plot.ts has an argument yax.flip, plot.zoo does not.
Is there a way to make the yaxis flip in plot.zoo?
I tried using a custom panel function:
panel.yaxis<-function(...) {
npnl<-parent.frame$panel.number
if (npnl %% 2 == 0) {
axis(side=3)
} else {
axis(side=2)
}
}
This leads to a blank window. I am stuck with the intricacies of the
plotting and axis
2010 Jun 16
1
Decoding raw vectors every other byte
I have to decode raw vectors read from a connection like this:
+++++++++++++++++++
fl<-file.choose()
fb<-file.info(fl)$size
fc<-file(fl)
open(fc,open='rb')
seek(fc,where=offset)
dat<-readBin(fc,'raw',n=(fb-offset),size=1,signed=FALSE)
close(fc)
++++++++++++++++++
The decoding performs a combination of a simple bitwise operator and a
simple arithmatic operator on
2012 Oct 30
1
Is there an lm() equivalent of panel.lmline()?
panel.lmline returns intercept and slope of y ~ x subsetted to the
combination of conditioning factors given to xyplot in lattice.
for instance:
xyplot(Xvalues ~ log(Qvalues)|Tfac, data = df7, panel = panel.lmline)
I am looking to find the equivalent formulation for lm() proper. If I do
this:
lmcal <- lm(Xvalues ~ log(Qvalues):Tfac, data = df7)
Only one value of the intercept is returned.
2012 Nov 26
1
zoo timeseries plot; minor tic mark level control
I cannot figure out how to tune the minor tic marks on the date axis of a
zoo plot.
I read hundreds of CSV files from a zip archive transparently. The
time/date strings I convert to POSIXct format, order them and then make a
zoo object as there may be cases which have unequal time stamping. As
follows:
######################
#Transform timestamps and reorder them
dat <- transform(dat,
2010 May 05
3
Memory issue
Reading a flat text file 138 Mbyte large into R with a combination of
scan (to get the header) and read.table. After conversion of text time
stamps to POSIXct and conversion of integer codes to factors I convert
everything into one data frame and release the old structures containing
the data by using rm().
Strangely, the rm() does not appear to reduce the used memory. I checked
using
2018 Nov 17
4
Impossible two bugs in Opus
Hello. Me again.
Have you tried to encode piano solo?
Noticed high bitrate Opus gave?
And there's also artefact at 15kHz
which wasn't in the original audio.
Visible with Spek program.
Download FLAC and Opus both files,
new link:
http://www.filedropper.com/example_3
FLAC full: 1084 kbps;
FLAC solo: 465 kbps.
with --bitrate 160:
Opus full: 158 kbps;
Opus solo: 190 kbps.
Included also Spek
2010 Jun 03
3
Interaction versus combinations
I can get the interactions between factors like this:
> idx=c(1,3,6,9)
> jdx=idx
> levels(interaction(idx,jdx,lex.order=TRUE))
[1] "1.1" "1.3" "1.6" "1.9" "3.1" "3.3" "3.6" "3.9" "6.1" "6.3" "6.6"
"6.9"
[13] "9.1" "9.3" "9.6"
2012 Jan 24
2
Calling function in DLL using .C
I cannot understand why a function appears to be available to R
(is.loaded('planckwR') returns TRUE) but the call with .C results in an
error message:
C symbol name 'planckwR' not in DLL for package <path to DLL file here>
This is what I do:
Loading a homebrewed DLL, compiled with MS VS97. The functions are all
void, the C calling sequence is used and all arguments
2009 Aug 11
3
Lattice: How to do error bars
I am trying to add 2 stdev error bars to lattice type plots:
panel.ebar<-function(x,y,dy=NULL,...) {
panel.xyplot(x,y,...)
panel.segments(x,y-dy,x,y+dy,...)
}
Then:
xyplot(y~x|fc,data=dat,dy=dat$dy,panel=panel.ebar)
This adds error bars but they are not conditioned on the factor fc.
xyplot(y+I(y-dy)+I(y+dy)~x|fc,data=dat)
This produces 3 series of points in different colors, conditioned
2001 Aug 15
2
WinAmp plug-in based on RC1?
Hi,
I just downloaded this and it says it's based on RC1 in the about box. Is
that a typo or is the plug-in not updated?
Olaf van der Spek
Almere, Holland
Olaf@XCC.TMFWeb.NL
http://xcc.tiberian.com/
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request@xiph.org'
2001 Sep 12
1
Small OggDrop menu patch
Hi,
This one adds shortcuts to the pop up menu.
--
Olaf van der Spek
http://xcc.tiberian.com/
Index: Script.rc
===================================================================
RCS file: /usr/local/cvsroot/win32-tools/oggdrop/Script.rc,v
retrieving revision 1.5
diff -r1.5 Script.rc
77c77
< POPUP "Bitrate"
---
> POPUP "&Bitrate"
88c88
<
2002 Jan 01
1
RC3 OggDrop
Hi,
It's nice to see my patch in action. Who made the "Save Quality" dialog box?
I think it should also contain the bitrate itself as a reference.
Olaf van der Spek
Almere, Holland
Olaf@XCC.TMFWeb.NL
http://xccu.sourceforge.net/
http://xcc.tiberian.com/
<p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To
2009 May 22
2
Returning only a file path on Windows
I am choosing a file like this:
#Bring up file selection box
fn<-file.choose()
fp<-file.path(fn,fsep='\\')
Unfortunately, the file path contains the short file name and extension as
well. I had hoped to get only the path so I could make my own long
filenames (for output graphs) by concatenation with this file path.
Of course I can split the string and assemble the components from
2007 Jun 22
2
One file open or locked way too many times. How to fix?
A Windows 2000 Server is a member server of the domain. The domain
server is CentOS 4.5 with all updates and Samba 3.0.24 built using the
packaging/RHEL/makerpms.sh script. The W2k server is opening this file
on the samba server.
This problem started several versions of CentOS and Samba ago, and I did
the upgrades thinking it would fix it. It did not.
It seems to be "locking" or
2012 Jan 20
1
Calling Windows DLL using .C; function name not known but in exports.
First time ever that I try to call subroutines in a Win DLL using R.
Have done this before using VBA and Python.
The C code's function argument list contains only double pointers
(double *x). The function is declared void, the output value is one of
the arguments.
C calling sequence is used.
When inspecting the exports of the DLL with dumpbin I can see that the
function I need is
2002 Dec 23
5
Bzip2 & Ogg Vorbis
Hi,
I've got some (seven) Ogg Vorbis files with a total size of 18637246 bytes.
When I use bzip2 to compress these files, the total size is 16949443. That's
10% less.
Is bzip2 supposed to be able to compress Ogg Vorbis files further?
If not, are these files encoded with wrong settings?
If so, why is there no option to use bzip2 with Ogg Vorbis by default?
Olaf van der Spek
Almere,
2009 Apr 08
3
Convert data frame containing time stamps to time series
I read records using scan:
dat<-data.frame(scan(file="KDA.csv",what=list(t="%m/%d/%y
%H:%M",f=0,p=0,d=0,o=0,s=0,a=0,l=0,c=0),skip=2,sep=",",nmax=np,flush=TRUE,na.strings=c("I/OTimeout","ArcOff-line")))
which results in:
> dat[1:5,]
t f p d o s a l c
1 1/21/09 5:01 16151 8.2 76 30 282 1060 53 7
2 1/21/09 5:02
2011 Jan 26
1
aggregate(as.formula("some formula"), data, function) error when called from in a function
I'm having a problem with aggregate.formula when I call it in a function and the function is converted from a string in the funtion
I think my problem may also only occur when the left hand side of the formula is cbind(...)
Here is example code that generates a dataset and then the error.
The first function "agg2" fails
> agg2(FALSE)
do agg 2
Error in m[[2L]][[2L]] : object
2003 Jun 18
2
Forward stepwise procedure w/ stepAIC
I'm attempting to select a model using stepAIC. I want to use a forward
selection procedure. I have specified a "scope" option, but must not be
understanding how this works. My results indicate that the procedure begins
and ends with the "full" model (i.e., all 17 independent variables)...not
what I expected. Could someone please point out what I'm not