[R] How to specify the type and size of font in bitmap format output?

2008-08-10 Thread Hyunchul Kim
Hi, all I need to specify a font (for example, type=helvetica and size=10) in bitmap output (for example, dev.print(bitmap, 'test.png'). How can I do this? Thanks. Hyunchul [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] how to add "arial" font in bitmap output?

2008-08-10 Thread Hyunchul Kim
Hi all, I want to specify "arial" font in bitmap output but I found that the default is "helvetica" and "arial" is not supported. How can I add "arial" in my bitmap output file? Thanks, Hyunchul [[alternative HTML version deleted]] __ R-help

[R] How to specify the type and size of font in bitmap format output?

2008-08-10 Thread Hyunchul Kim
Hi, all I need to specify a font (for example, type=helvetica and size=10) in bitmap output (for example, dev.print(bitmap, 'test.png'). How can I do this? Thanks. Hyunchul [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] how to add "arial" font in bitmap output?

2008-08-10 Thread Hyunchul Kim
Hi all, I want to specify "arial" font in bitmap output but I found that the default is "helvetica" and "arial" is not supported. How can I add "arial" in my bitmap output file? Thanks, Hyunchul [[alternative HTML version deleted]] __ R-help

Re: [R] how to add "arial" font in bitmap output?

2008-08-11 Thread Hyunchul Kim
it on your > system you may be able to make use of it by adding a 'family'. The details > depens on details you failed to give: please see the footer of this message. > > > On Mon, 11 Aug 2008, Hyunchul Kim wrote: > > Hi all, >> >> I want to specify "

[R] get time as a number

2010-09-19 Thread Hyunchul Kim
Hi, all, How to get a time as a number? While script is running, I want to print the elapsed time something like TIME_AS_SECOND() in the following script inittime <- TIME_AS_SECOND() for (i in 1:100){ do_something(i) curtime <- TIME_AS_SECOND() elapsedtime <- curtime-inittime pr

[R] converting "if not os.path.exists(afile): continue" to R

2010-08-06 Thread Hyunchul Kim
Hi, all How to convert following simple python script to R ? if not os.path.exists(targetfile): continue Thanks in advance, Hyunchul [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

[R] converting "if not os.path.exists(afile ): continue" to R

2010-08-06 Thread Hyunchul Kim
Hi, all How to convert following simple python script to R ? if not os.path.exists(targetfile): continue Thanks in advance, Hyunchul sundol313´ÔÀÇ ºí·Î±× ¾È³çÇϼ¼¿ä. [[alternative HTML version deleted]] __ R-help@r-p

[R] how to test if a vector contain a value?

2010-08-16 Thread Hyunchul Kim
Hi all, How to convert following simple python script to R if x in a_list: print x OR simply, how to test if a vector contain a value? Thank you in advance, Hyunchul [[alternative HTML version deleted]] __ R-help@r-project.org mailin

[R] how to take a os.path.basename

2010-08-29 Thread Hyunchul Kim
Hi, all I made a simple R script to take the basename of a file without directory names. path.splitted <- strsplit('/path/to/a_basename', '/') path.length <- length(path.splitted[[1]]) basename <- path.splitted[[1]][path.length] # basename <- 'a_basename' Is there a simple function for this? so

[R] take component names of a list

2010-08-29 Thread Hyunchul Kim
Hi, all I want to take a vector of component names of a list. list.a <- list('x'=1, 'y'=2) how to get a c('x','y') from list.a? Thanks in advance, Hyunchul [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://st

[R] listing files recursively

2010-08-30 Thread Hyunchul Kim
Hi, all how to get all filenames in a directory and its all subdirectories? something like filenames <- c(Sys.glob('/path/to/directory/*'), Sys.glob('/path/to/directory/*/*'), Sys.glob('/path/to/directory/*/*/*'), ...) Thanks in advance, Hyunchul [[alternative HTML version deleted]] _

[R] function to compare numbers

2010-09-03 Thread Hyunchul Kim
Hi, all is there a built-in function to compare two numbers? something like following function cmp <- function(x, y){ value <- 0 if (x > y){ value <- 1 }else if (x == y){ value <- 0 }else { value <- -1 } return(value) } Thanks in advance, Hyunchu

[R] how to free memory? (gc() doesn't work for me)

2010-09-03 Thread Hyunchul Kim
Hi, all I have a huge object that use almost all of available memory. R> rm(a_huge_object) R> gc() doesn't free memory and ?gc doesn't show anything. Are there any suggestion? Thanks in advance, Regards, Hyunchul [[alternative HTML version deleted]]

Re: [R] how to free memory? (gc() doesn't work for me)

2010-09-04 Thread Hyunchul Kim
.4 113632405 867.0 102762450 784.1 > > rm(x) > > gc() > used (Mb) gc trigger (Mb) max used (Mb) > Ncells 174202 4.7 741108 19.8741108 19.8 > Vcells 1761954 13.5 90905923 693.6 102762450 784.1 > > > On Sat, Sep 4, 2010 at 12:46 AM, Hyunchul Kim

[R] elseif syntax

2008-05-01 Thread Hyunchul Kim
Hi, all How to use elseif ? For example, like following short python examples. * x = 1 if x == 1: print 'same' *elif* x > 1: print 'bigger' else: print 'smaller' ***** Thanks in advance, Hyunchul Kim [

[R] elseif syntax

2008-05-01 Thread Hyunchul Kim
Hi, all How to use elseif ? For example, like following short python examples. * x = 1 if x == 1: print 'same' *elif* x > 1: print 'bigger' else: print 'smaller' ***** Thanks in advance, Hyunchul Kim [

[R] tests of lognormal distribution in R

2008-02-14 Thread Hyunchul Kim
Hi all, I have a data of lognormal distribution (sample size > 1,000,000). What I want to do is 1) to test if my dataset is a lognormal distribution or not (Histogram shows a nice normal distribution in log scale but I want to check) 2) two subsets from this dataset have same mean or not (like "t

[R] tests of lognormal distribution

2008-02-14 Thread Hyunchul Kim
Hi all, I have a data of lognormal distribution (sample size > 1,000,000). What I want to do is 1) to test if my dataset is a lognormal distribution or not (Histogram shows a nice normal distribution in log scale but I want to check) 2) two subsets from this dataset have same mean or not (like "t

[R] How to join path with arguments

2008-02-19 Thread Hyunchul Kim
Hi, all How to format and join strings ? For example, like following short python examples. * name1 = 'sample-plot' filename = '%s.png' % name1 inputdir = '/path/to/dir' os.path.join(inputdir, filename) ** Best, Hyunchul Kim [[al

[R] How to count from larger value to smaller value in ecdf (Empirical Cumulative Distribution Function)

2008-02-19 Thread Hyunchul Kim
f like graph by counting from larger values to smaller values. Thank you in advance. Hyunchul Kim [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

[R] histogram like x labels in barplot

2008-03-06 Thread Hyunchul Kim
Hi, all I drew a barplot with > barplot(data1, beside=TRUE) and then, I want to labels with hist() like x-axis ticks. How can I do this? Thanks in advance, Hyunchul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

[R] how to set font size in 'pt'

2008-12-10 Thread Hyunchul Kim
nt. I heard that many people use R to plot publication quality figures and tried. How did you write given font size in "pt" (for example, font-size 10pt in arial font) Thank you in advance. Hyunchul Kim [[alternative HTML version deleted]] ___