generate_zenkaku_sets {lazy.tools}R Documentation

Generate Zenkaku Character Sets:

Description

Generate Zenkaku Character Sets:

Usage

generate_zenkaku_sets(where = "global")

Arguments

where

Name of the environment in which the character set are generated.

Details

This function generates the following objects in the specifed environment:
zalpha, zAlpha, zdigit, zhkana, zhkana, Prefectures

When where != "global" the character set will be generated in the calling environment: envir=parent.frame()

Examples

generate_zenkaku_sets()

paste( paste(zAlpha[c(14,3,3)], collapse="")
 , paste(zdigit[c(1,7,10,1)],collapse=""), sep="-" )
cat("\nMy favorite prefectures: ", Prefectures[c(26,40,13)], "\n")

# clear the ones in the global env.
zdigit=NULL; zalpha=NULL

# generate in the global env.
generate_zenkaku_sets(  )
Print(zdigit[1:5],zalpha[1:5])


# Run below by copy and paste.
## Not run: 
# a function to create and print zdigit and zalpha
testZ <- function( where="global" ){
 cat("\nIn test\n")
 generate_zenkaku_sets( where=where )
 Print(zdigit[1:5],zalpha[1:5])
}

# clear the ones in the global env.
zdigit=NULL; zalpha=NULL
# generate in the function
testZ( "here" )

# clear the ones in the global env.
zdigit=NULL; zalpha=NULL

# generete in the global env. from a function
testZ()
Print(zdigit[1:5],zalpha[1:5])

rm(  zalpha, zAlpha, zdigit, zhkana, zkkana, Prefectures )

## End(Not run)


[Package lazy.tools version 0.1.4 ]