Displaying 20 results from an estimated 1000 matches similar to: "[R-sig-Geo] plot() and Jpeg() increase font size and resolution"
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
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 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
2005 May 24
2
Basic matematical functions with NAs
Dear All,
I've tried to sum columns -- different species of flowers, fruits plus twigs -- with NAs to get litterfall/trap, and then after use litterfall to calculate production (litterfall (grams)/ hectare/ day. But R 'sees' litterfall/trap as a string.
My question: How to use basic mathematical functions to deal with NAs in data management.
Example (as you can note I have many
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 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
2007 Aug 31
0
FW: sapply to return factors in dataframe
Ahhrg List,
there was a hitch in the previous code. Updated and functional version
follows after my initial question:
I am trying to randomise a dataframe with mixed factors/numeric
variables and return a new (randomised) dataframe with the same columns
(as factors/numeric).
simgap<-function(x) {
ma<-max(x)
mi<-min(x)
Xout<-runif(length(x),min=mi,max=ma)
return(Xout) }
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
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,
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
2003 Jan 13
2
summarizing dataframe
Hi Listers,
Surely, I just have a mental block and there is a more elegant way of
creating a summary count (other than extracing it from ftable). I''d like to
create a new data.frame containing counts of spell by loc ie have three
columns showing spell,loc,count. Below the data.frame...
Any help appreciated
Thanks Herry
spell loc
101 Parts 1
102 Overall 2
105 Parts 1
106
2003 Sep 11
1
Customised legend in lattice
Hi List,
Am trying to customize a legend in trellis: Draws 2x5 lines in 5 colors and
2 linetypes. I would like to add two more items to the legend showing the
key for the line types above the colored legend.
Any suggestions welcome - thanks Herry
#############################
#Following example code:
library(gregmisc)
trellis.device(bg="white")
i1=0
i2=-1.89767506
i3=-1.17087085
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)
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 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
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
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)