Displaying 20 results from an estimated 3000 matches similar to: "summarizing dataframe"
2006 Nov 27
2
[R-sig-Geo] plot() and Jpeg() increase font size and resolution
Thanks to Edzer and Roger,
I can now plot with increased font sizes. However, jpeg still does not
reproduce these, nor does it show up in high quality. What I would like
to do is produce some highresolution jpegs.
Any help would be appreciated
Thanx
Herry
R2.4 on Mandriva 10.2 linux.
Dr Alexander Herr
Spatial and statistical analyst
CSIRO, Sustainable Ecosystems
Davies Laboratory,
University
2007 Jun 14
1
blotched y-axis text in plot function
Hi List,
I have recently upgraded to opensuse10.2 and R 2.5 (compiled from
source). Now, whenever I use plot the y-axis and labels are black
blotches while x-axis and labels are fine.
Using demo(graphics) this occurs with plot/boxplot/hist/pairs/coplot but
not in the pie graphs and in the "The level of Interest in R" plot,
which uses axis to define the y-axis.
I presume this has to
2007 May 18
1
error: GLX extension missing on server
Hi List,
when loading library(rgl) I get error "RGL: GLX extension missing on
server". I have Mesa and xgl installed, but xgl info sais its an highly
experimental code. Does this mean I shouldn't bother for a while with
opengl or are there alternatives?
Any help appreciated
Thanx
Herry
R 2.4.1 on x86_64 opensuse 10.2
Dr Alexander Herr - Herry
Spatial and statistical analyst
2006 Nov 24
2
plot() and Jpeg() increase font size and resolution
Dear list,
I am having troubles increasing the fontize when plotting a
variogram{gstat} and its model (vgm) with plot and using jpeg(). Also
the resolution in the jpeg call does not work. I am using R2.4 on
Mandriva 10.2 linux.
I can change fontsize with cex.axis in a normal plot, so I presume it
has to do with plotting the variogram model. Any help on how to increase
the font size and
2002 Dec 18
3
summary stats including NA's into new dataframe
List,
I am trying to extract summary statistics from a data frame with several
variables (and NAs) into a dataframe with the columns: Variablename (ie the
colnames of original data), mean, stdev, max, min, Valid N, Missing Values.
Extracting the statistics is straightforward using stack and aggregate.
However, I haven''t succeeded in obtaining the number of Missing Values. I
can extract
2007 Jul 06
3
?replace characters within vector data
Hi List,
I want replace characters within a vector. Outside R I could use sed,
but I'd like to automate it in R. For example
vectorx
xxxyyz
xxxyyza
xxxyyzzb
I want to change to:
vectorx
aaayyz
aaayyza
aaayyzzb
The obvious replace command only deals with whole data entries?
Any hints would be appreciated.
Thanks
Herry
2007 Sep 19
4
fontsize in mosaic plot lables
Hi List,
I am trying unsucessfully to modify the fontsize of lables in mosaic:
require(vcd)
mosaic(Titanic, pop=FALSE,
labeling_args=list(rot_labels=c(bottom=90,top=90),
set_varnames = c(Sex = "Gender"),
gp_text=gpar(fontsize=20))) #can't get it to resize text
tab <- ifelse(Titanic < 6, NA, Titanic)
# it works for labeling_cells
labeling_cells(text = tab,
2006 Dec 18
2
surface3d grid from xyz dataframe
Hi List,
I am trying to plot a grid with an overlayed height. I have a dataframe
with four variables:
x,y,gridvalue,height. The dataframe has 2.5mio observations (ie grid
points),
I assign colors through the gridvalue using map_color_gradient thus
producing:
x,y,gridvalue,height,gridcol as variables of the dataframe. The grid
dimensions are 1253 x 2001 (=2507253 data points).
My attempts with
2018 Mar 05
4
raster time series statistics
Hi List,
The following code returns an "Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format"
require(raster)
require(rts)
require(stringi)
r <- raster(ncol=100, nrow=100)
values(r) <- runif(ncell(r))
list(ID=seq(1:24),month=rep(str_pad(1:12, pad = 0,width = 2 , "left"),2),year=sort(rep(2016:2017,12)))->dt
2018 Mar 06
0
raster time series statistics
Hi Herry,
This is probably due to a call to strptime (or similar). No, it
doesn't accept %Y-%m as a valid format. Maybe add a constant day to
all the dates as that will work:
dt<-list(ID=seq(1:24),month=rep(formatC(1:12,flag=0,width=2),2),
year=sort(rep(2016:2017,12)))
timelst<-paste(unlist(dt['year']),unlist(dt['month']),"01",sep="-")
2004 Apr 29
1
R-crash using read.shape (maptools)
Hi List,
I am trying to read a large shapefile (~37,000 polys) using read.shape [winxp, 1gig ram, dellbox). I receive the following error:
AppName: rgui.exe AppVer: 1.90.30412.0 ModName: maptools.dll
ModVer: 1.90.30412.0 Offset: 0000309d
The getinfo.shape returns info, and the shapefile is readable in arcmap.
Any ideas on how to overcome this?
Thanks Herry
2018 Feb 15
3
using cat to log to file with sapply
Hi List,
I am trying to write unsuccessfully to a logfile with cat. Here my example code:
letters[1:5]->x
logf<-"test.txt"
cat('%%%%%%%%%%%%%%%%%%%%%%%%%%\n',file=logf)
catf<-function(x,...,logfile='log.txt', append=TRUE){ cat(x,'\n', file=logfile, append=append)}
testit<-function(x,...){
paste0('this is x: ',x)->y
return(y)
2007 Jul 04
2
for loop doesn't stop with upper loop value
Hi list,
could anyone please educate me on the following:
lst<-seq(47, 239, by=12)
for(n in lst)
{
lower=n; upper=lower+10
for(i in lower+2 : upper)
{
print(paste(n, " i: ", i, " lower: ",lower, " upper :", upper))
}
}
does not stop when i = upper
A while loop fixes this but, I still don't understand why the for loop
doesn't stop
2018 Mar 06
0
raster time series statistics
> On Mar 5, 2018, at 3:28 PM, <Alexander.Herr at csiro.au> <Alexander.Herr at csiro.au> wrote:
>
> Hi List,
>
> The following code returns an "Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format"
I'm unable to produce that error. Which function was being evaluated to produce the error? I don't see
2003 Apr 04
3
trellis.graphic in for-loop
Hi list,
I am unsuccessfully trying to produce a serious of trellis barcharts from
within a for-loop. The barcharts work outside the loop. What am I missing?
Example attached.
Thanks Herry
#XXXXXXXXXXXXXXXXXXXXXX
trellis.device(bg="white")
trellis.par.get("fontsize")->fontsize
fontsize$default<-16
trellis.par.set("fontsize",fontsize)
2007 Aug 09
1
plot table with sapply - labeling problems
Hi List,
I am trying to label a barplot group with variable names when using
sapply unsucessfully.
I can't seem to extract the names for the indiviual plots:
test<-as.data.frame(cbind(round(runif(50,0,5)),round(runif(50,0,3)),roun
d(runif(50,0,4))))
sapply(test, table)->vardist
sapply(test, function(x) round(table(x)/sum(table(x))*100,1) )->vardist1
par(mfrow=c(1,3))
2018 Mar 06
2
raster time series statistics
Last line in the following (updated) code produces the error
require(raster)
require(rts)
require(stringr)
r <- raster(ncol=100, nrow=100)
values(r) <- runif(ncell(r))
stack(r)->s
r->rs
for(i in 1:23){
rs[]<-r[]*i
addLayer(s,rs)->s
print(nlayers(s))
}
dt<-list(ID=seq(1:24),month=rep(formatC(1:12,flag=0,width=2),2),
year=sort(rep(2016:2017,12)))
2007 Oct 08
1
special characters in linux using dev.print
Hi List,
I want to print ? in a lattice graph label. This works in windows, but the linux version has problems - it cannot translate the character. Error is "invalid input in mbcsToLatin1".
I use the standard encoding and also dev.print(file="filename",dev=pdf, encoding="PDFDoc.enc")
I am afraid I don't know enough about the linux font encodings to figure out
2007 Feb 01
1
rgl.postscript{rgl} crashes R
Hi list,
I am trying to print a rgl scene. I can do this with
rgl.snapshot("test.pnt",fmt="png"), but
rgl.postscript("test.pdf",fmt="pdf") does crash R and returns to the
linux shell after extented time period.
I am running R 2.4.0 on i686 linux mandrake 10.2. Do I need any other R
external program to make this work?
Thanks
Herry
Dr Alexander Herr -
2004 Apr 20
1
Error while loading R2HTML in Rprofile
Hi List,
When loading library(R2HTML) in Rprofile I get the following error:
Error in firstlib(which.lib.loc, package) :
couldn't find function "ps.options"
Error in library(R2HTML) : .First.lib failed
[Previously saved workspace restored]
% ps.options is there
% Loading the library from the command prompt works fine, other libraries load fine through Rprofile.
% This