Displaying 20 results from an estimated 8000 matches similar to: "Print methods"
2009 Aug 19
2
RGoogleDocs/RCurl through proxy
Dear list,
I am trying to use RGoogleDocs, but I am connecting through a proxy server.
I know RCurl is used for the connection, which should be able to deal
with proxies and such.
How do I set this up for RCurl? And can I use those settings with
RGoogleDocs as well?
I have the name of the proxy server and the port number.
(Windows XP).
thanks,
Remko
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:
2010 Mar 30
1
SHLIB not working (Win Vista)
Dear R-helpers,
I tried to build a DLL like I have done so many times, but this time
on my new machine, but it gives the erorr:
(from cmd window)
>R CMD SHLIB Boxcnt.f
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Error c:/PROGRA~1/R/R-210~1.1/share/make/winshlib.mk 4: Command syntax error
*** 1 errors during make ***
The error is not in my Fortran file, because I also tried other files
2009 Oct 20
1
system() or shell() with python script
Hi all,
I am having some problems calling a python script from R that resides
in a folder that is in the path (WindowsXP):
> system("quickPadTool.py")
Warning message:
In system("quickPadTool.py") : quickPadTool.py not found
# I also tried 'shell' (and shell.exec as well).
> shell("quickPadTool.py")
'quickPadTool.py' is not recognized as an
2009 Jul 20
1
Problem with as.POSIXct on dates object
Dear R-helpers,
I have a problem converting an object made with the 'chron' function
to a POSIXct object:
# Make date based on DOY
dat <- chron(dates=232, origin.=c(month=1, day=1, year=2008))
dat
#[1] 08/20/08
# Converting to POSIXct uses current timezone (Sydney):
as.POSIXct(dat)
#[1] "2008-08-20 10:00:00 EST"
# Setting GMT timezone has no effect?
as.POSIXct(dat,
2009 Feb 26
2
interpSpline with dates?
Dear R-helpers,
can I use a POSIXct date as the x variable in interpSpline? The help
page says x and y need to be numeric... is there a workaround?
example:
library(splines)
testdfr <- data.frame(Date=seq(as.POSIXct("2008-08-01"),as.POSIXct("2008-09-01"),
length=10))
testdfr$yvar <- rnorm(10)
sp <- interpSpline(yvar ~ Date, testdfr)
preddfr <-
2011 Sep 06
2
Sweave : some comments disappear
Dear R-helpers,
when I have an R code chunk in a sweave file like this:
<<>>=
x <- 1:10
# this comment disapears
x
# this one does not!
print(x)
#mean
mean(x)
@
The first comment does not appear in the sweaved document, the second
one does. How can this be?
I have tried print=TRUE and keep.source=TRUE, but neither seem to
affect this behavior.
thanks,
Remko
2009 Dec 01
4
Is there a function to test if all the elements in a vector are unique
length(unique(c(1,2,2)))==length(c(1,2,2))
I use the above test to test if all the elements in a vector are
unique. But I'm wondering if there is a convenient function to do so
in R library.
2009 Oct 19
2
Possible bug in plot.POSIXct regarding x axis
I believe I have found a bug (or at least a misfeature) in plot.POSIXct.
See the following example code.
set.seed(1)
x=seq(1,1e8,length=100)+round(runif(100)*1e8)
y=as.POSIXct(x,origin="2001-01-01")
plot(y)
This plots some random (date)times against their indices. The y axis
correctly shows appropriate values (years), but the x axis contains the
single number '59:58' in the
2009 Aug 04
1
Build a dataframe row by row?
Hi,
Time for another of my "newbie" questions.
Is it possible to build up a data.frame "row by row" as I go
I'm going to be running a bunch of experiments (many in a loop) to test
different things. I'm using AUC as my main performance measure.
My thought was to add a row to a data.frame for each iteration and then
have a nice summary report at the end.
I found
2009 Dec 01
1
vector as data.frame element?
It seems that an vector or other non elemental data type can not be
assigned to an element in the data.frame. I'm wondering what is the
walk around.
> li=data.frame(a=c(0,1), b=c('x','y'))
> li$b[[1]]= 'x'
> li$b[[2]]<- c('y','z')
Error in li$b[[2]] <- c("y", "z") :
more elements supplied than there are to replace
2010 Jul 14
1
Arrange values on a timeline
I have a set of labels arranged along a timeframe in a. Each label has
a timestamp and marks a state until the next label. The dataframe a
contains 5 such timestamps and 5 associated labels. This means, on a
continious scale between 1-100, there are 5 markers. E.g. 'abc' marks
the timestampls between 10 and 19, 'def' marks the timestamps between
20 and 32, and so on.
a <-
2010 Jan 15
2
processing all files with certain extension in a directory
Hi all,
I'm trying to process all files with a certain extension "*.ext" in a
directory like this:
> R --slave --args /my/dir < dir_plot.r
where I then I want to do something like:
myarg <- commandArgs()
inputdir <- myarg[length(myarg)]
print(inputdir)
"for file with extension "*.ext in inputdir"
do
data = process.data(file)
outfile =
2009 Aug 03
2
combine venn diagram and pie chart
Hi R users,
I am wondering if it there is any R's function helping integrate venn
diagram and pie chart to compare two related datasets.
I know the package limma(bioconductor) has something built-in for making
venn diagram, but I guess it would be very painful to use line and text to
specify the proportions in the fashion of pie chart .
Thanks in advance,
Kevin Chang
--
View this
2010 Jan 15
2
How to delete matrix rows based on NA frequency?
Hi all,
I would like to remove rows from a matrix, based on the frequency of missing values. If there are more than 10 % missing values, the row should be deleted.
I use the following to calculate the frequencies, thereby getting a new matrix with the frequencies:
freqNA=rowMeans(is.na(exprdata))
But is there a shorter way to remove the rows based on "(1-freqNA)>0.1"
2009 Nov 25
3
Concave hull
Dear friends,
Do you know how to calculate the CONCAVE hull of a set of points (2-
dimensional or n-dimensional)? is that possible in R? (With a "smoothing"
parameter of course).
Best,
--
Corrado Topi
Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct529 at york.ac.uk
2009 Nov 19
2
3D plot, rotatable and with adjustable symbols
Hi all,
I've tried to make a 3D plot, but have run into some problems.
I'd like to have a plot that I can rotate interactively using the mouse, which is possible using the plots3d {R.basic}. However, I would like to change the symbols used as the points, but there's no pch in plot3d().
If I use the Scatterplot3d package, I'm able to change this, but not able to rotate
2009 Feb 28
2
rgl persp3d bounding box color problem.
Hi guys,
I hit on a problem when I use rgl.
Could you try to run the code here in this link and see why the first persp3d gives a red bounding box and the second shows black?
http://rafb.net/p/g1i7ur33.html
(sorry for not pasting the code here directly but my previous email got filtered by this list so I suspect my code looks like spam to the spam filter)
I'm expecting black color to be
2010 Oct 25
2
R-Fortran question (multiple subroutines)
Dear R-helpers,
apologies if this is somewhere in a manual, I have not been able to
find anything relevant. I run Windows Vista.
I have some Fortran code in a subroutine, and have no problem calling
this from R with .Fortran, compiling the code either with 'R CMD
SHLIB' or independently with gfortran.
But is it possible to have more than one subroutine in my source file,
one depending
2009 Feb 13
2
Running examples failed (but there are none).
Dear R-helpers,
making a package (windowsXP), that includes a bunch of functions, but
none have examples (all example code is within \dontrun{} blocks).
I do R CMD check Maeswrap, all bits get OK-ed, except:
"Running examples in 'Maeswrap-Ex.R' failed."
When I run the 'Maeswrap-Ex.R' file myself, there are no problems.
Any pointers?
thanks
Remko