[R] how to display prolerly chinese character of sheet name in excel file in xlsx library?

2013-12-29 Thread luofeiyu
> library("xlsx") Loading required package: rJava Loading required package: xlsxjars > test_template <- loadWorkbook("c:/workspace/test.xls") > design_tab <- getSheets(test_template) > design_tab $`涓` [1] "Java-Object{org.apache.poi.hssf.usermodel.HSSFSheet@1560ca4}" the sheetname which design

[R] why the "[^\\d]" is not equal to "[^0-9]" in R regular expression?

2013-12-29 Thread luofeiyu
gregexpr(pattern="[^0-9]","+12345ty") [[1]] [1] 1 7 8 attr(,"match.length") [1] 1 1 1 attr(,"useBytes") [1] TRUE gregexpr(pattern="[^\\d]","+12345ty") [[1]] [1] 1 2 3 4 5 6 7 8 attr(,"match.length") [1] 1 1 1 1 1 1 1 1 attr(,"useBytes") [1] TRUE why the pattern `[^\\d]` has no same effect as of `[