similar to: using cat to log to file with sapply

Displaying 20 results from an estimated 1000 matches similar to: "using cat to log to file with sapply"

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 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 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
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
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
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
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
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)
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)))
2016 Oct 27
2
Bug with auto-vectorization of logf
Hi, I intended to file this bug on Bugzilla, but I've received no response from llvm-admin in the 10 days since asking for a Bugzilla account. I've written 2 test functions in C that take in a float array x of size n and output float array f(x), where f is either fabsf or logf. The LLVM 3.9 auto-vectorization docs claim that both functions will be vectorized:
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
2016 Oct 27
0
Bug with auto-vectorization of logf
+Tanya for the account issue. > On Oct 27, 2016, at 11:36 AM, Eric Martin via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > I intended to file this bug on Bugzilla, but I've received no response from llvm-admin in the 10 days since asking for a Bugzilla account. > > I've written 2 test functions in C that take in a float array x of size n and output