Displaying 20 results from an estimated 8000 matches similar to: "How to duplicate rows in dataframe?"
2005 May 26
0
R: weighted.mean and tapply (again)
what about using "mapply"?
splitted.value<-with(x.1, split(VALUE, GROUP))
splitted.freq<-with(x.1, split(FREQUENCY, GROUP))
mapply(weighted.mean, splitted.value, w=splitted.freq)
Stefano
>-----Messaggio originale-----
>Da: r-help-bounces at stat.math.ethz.ch
>[mailto:r-help-bounces at stat.math.ethz.ch]Per conto di
>james.holtman at convergys.com
2004 Oct 08
1
reading partial file content
hi,
I'd like to extract data from very large files (ca 1-2 Mio lines),
and I already know which lines of these files I need.
Is there a way to do it without filling the memory with the whole file content?
The lines I need are randomly distributed within the files.
Thanks,
Marc
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at
2005 Feb 15
0
Re: [Rd] corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)
James, thanks for the response.
I understand now my puzzle.
tmp <- data.frame(y1=1:4, f1=factor(c("A", "B", "C", "D")))
tmp$y2 <- NA
tmp[1:2, "y2"] <- 2
Does the job. I see that I should add a full column. In my case adding full
column of NAs and then adding values, solves my problems.
Thanks to all.
james.holtman at convergys.com
2003 Jun 19
1
Problem reading a PDF output
I generated a PDF output file of 10 plots. When I try to view it with
Adobe reader (R4 & R5), it will lockup the reader (it is consuming 100% of
the CPU) after presenting the 4th plot. I can generate the plots just fine
in Windows and as a postscript file reading it with GSview.
Is there anyway to tell what might be wrong with the PDF output? The file
is 890KB in size if anyone would like
2010 Dec 18
0
[BioC] problem with function
Hi Christian, Chuck (and lists)
It seems that the problem may be the strange behaviour of 'unstack' inside a function.
See this thread in the R mailing list:
http://tolstoy.newcastle.edu.au/R/help/04/03/1160.html
Anyway, I got round the problem by using 'aggregate' instead of converting to a list and then tapply to sum values of metric. Probably more efficient as well.
Thanks
2004 Oct 29
1
Error in PDF output in R 2.0.0
The following script works fine in R 1.9.1. It was creating a PDF file
with the graphs in it. In R 2.0.0, I got the error message below. I tried
the same script just outputting to Windows and postscript and the output
was OK. The error message only showed up when trying to create a PDF file.
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386,
2015 Sep 26
0
Hidden files problem in R CMD check
Christian,
those are resource forks from your files - possibly maintained by your (likey very old?) editor.
First, is seems that you are not creating the tar ball correctly - the correct way is to use R CMD build which should not include resource forks nor files on the ignore list.
That said, if for some reason you intend to create is by hand (not recommended), you may want to set
2004 Dec 12
1
'object.size' takes a long time to return a value
I was using 'object.size' to see how much memory a list was taking up.
After executing the command, I had thought that my computer had locked up.
After further testing, I determined that it was taking 241 seconds for
object.size to return a value.
I did notice in the release notes that 'object.size' did take longer when
the list contained character vectors. Is the time that it is
2015 Sep 26
2
Hidden files problem in R CMD check
Dear Simon,
Thank you very much for your help, it did solve my problems!! Great!
I have googled COPYFILE_DISABLE and found the following site which does
explain the issue with tar on Mac OS X, see:
http://unix.stackexchange.com/questions/9665/create-tar-archive-of-a-directory-except-for-hidden-files
Instead of doing:
$tar czf xps_1.29.2.tar.gz xps
I did now:
$COPYFILE_DISABLE=1 tar czf
2015 Sep 27
0
Hidden files problem in R CMD check
On Sep 26, 2015, at 5:06 PM, cstrato <cstrato at aon.at> wrote:
> Dear Dirk,
>
> Yes, I know, however forget for one moment R.
>
> If I use tar independent of R it still should not create these hidden files.
>
> BTW, do you know where these hidden files are stored on the Mac?
>
Please consider reading my original reply - those are not actual files (all but
2004 Feb 02
1
Robust nonlinear regression - sin(x)/x?
You reall have only one parameter in your model, c = a/b. You can't
identify both a and b from your model, therefore, you should fit the
linear model: lm(z ~ c* sin(x)/x)
Ravi.
----- Original Message -----
From: cstrato <cstrato at aon.at>
Date: Monday, February 2, 2004 2:28 pm
Subject: [R] Robust nonlinear regression - sin(x)/x?
> Dear all
>
> Since I did not receive any
2007 May 27
2
[Bioc-devel] promptClass
promptClass fails to identify methods associated with the class. Here
is a fix:
Index: promptClass.R
===================================================================
--- promptClass.R (revision 41719)
+++ promptClass.R (working copy)
@@ -165,7 +165,7 @@
if (nmeths > 0) {
.meths.body <- " \\describe{"
for (i in 1:nmeths) {
- .sigmat
2013 Aug 29
2
Packages not found
Dear all,
On the CRAN website http://cran.r-project.org/ it is currently not
possible to get to the packages. Clicking on "Packages" or on
"Contributed extension packages" results in Error 404: Object not
found!, see: http://cran.r-project.org/web/packages/
Best regards,
Christian
_._._._._._._._._._._._._._._._._._
C.h.r.i.s.t.i.a.n S.t.r.a.t.o.w.a
V.i.e.n.n.a
2013 Aug 30
1
Problem with texi2pdf(..,clean=TRUE)
Dear all,
To create a *.pdf file from a *.Rnw file I do:
olddir <- getwd();
setwd(outdir);
tryCatch({Sweave("QAReport.Rnw");
tools::texi2pdf("QAReport.tex", clean=TRUE)
},
finally = setwd(olddir)
);
This works fine, however 'clean=TRUE' does only work when:
outdir <-
2014 Jun 23
1
operation on ‘numsels’ may be undefined
Dear all,
Since many years the following C++ code does compile on ALL Bioconductor
servers (Linux, Windows, Mac) without any warnings:
Int_t numsels = 0; //number of selected entries
...
for (Int_t i=0; i<size; i++) {
numsels = (arrMask[i] == 1) ? ++numsels : numsels;
}//for_i
Even on the recently added release server 'zin2' Linux (Ubuntu 12.04.4
LTS) the
2009 Mar 29
2
Compiler options for Makefile.win
Dear all,
For certain reasons I have to compile the source code of my package on
Windows XP using Microsoft Visual Studio 9.0, thus I had to create a
"Makefile.win". Now I have a question regarding compiler options /MT vs
/MD for Makefile.win.
The following partial output shows that when building my package on
Windows XP using "R CMD build --binary xps" with compiler
2009 Oct 15
2
Question when compiling source code with VC++
Dear Duncan,
In your document "readme.packages.txt" you have a very helpful chapter
on "Using Visual C++".
Please allow me to ask you one question: Why do you propose the option
"/MT" instead of option "/MD"?
(To my knowledge usually option "/MD" is used when compiling programs
with VC++.)
Best regards
Christian
2010 Feb 10
2
wcstombs error when compiling package with Debian/Ubuntu
Dear Debian/Ubuntu experts,
For the second time users of my BioC package reported problems when
trying to compile it on Debian/Ubuntu.
The error is always the same: "'wcstombs' was not declared in this
scope", see:
https://www.stat.math.ethz.ch/pipermail/bioconductor/2010-February/031739.html
https://stat.ethz.ch/pipermail/bioconductor/2009-August/029192.html
Since I have no
2008 Dec 22
1
How to add a slot to S4 class of an existing package?
Dear all,
Since my package is based on S4 classes, I would like to know how to add
a slot to an existing S4 class without breaking the code of users of my
package.
Assume the following S4 class:
setClass("MyClass",
representation(name = "character",
type = "character",
data = "data.frame"
),
prototype(name =
2011 Mar 11
1
WARNING Undocumented S4 methods 'initialize' - why?
Dear all,
I am just writing the documentation file for S4 class 'QualTreeSet' and
get the following warning with R CMD check:
* checking for missing documentation entries ... WARNING
Undocumented S4 methods:
generic 'initialize' and siglist 'QualTreeSet'
All user-level objects in a package (including S4 classes and methods)
should have documentation entries.
See the