haotu : an open lab notebook


Search text in pdf files that are images

Filed under: Google Docs — S @ 03:10

Google Docs will scan a pdf and extract the text, then you can search the text online in Google Docs. I use the Quickview option when I find a pdf in Google. This opens a Google Docs page and automatically extracts the text (it may take a small amount of time). Then you search and copy text in the document unlike in Adobe.


Cannot send more than one line to R when using Tinn-R

Filed under: R, Tinn-R, Windows 7 — S @ 02:35

See the following link for the original solution to this very common problem: http://sourceforge.net/projects/tinn-r/forums/forum/481900/topic/4541955

1. First make sure that the temporary folder that Tinn-R uses is NOT Read-only. Type


into an R terminal to find out the file location. Then go to this location and check the file properties, uncheck the read-only box. If you cannot see the Application Data folder it may be that you have not setup windows to see hidden files and folders. If this is the case you can just make all the files in your user directory NOT read-only by unchecking the read-only box for your user directory and applying that to all the sub directories… this is not an optimal solution…

2. Run the following code in the R terminal. You can make some changes like which repository R uses etc.

## Tinn-R: necessary packages and functions
## Tinn-R: >= with TinnR package >= 1.0.3
## Set the URL of the preferred repository, below some examples:
options(repos='http://software.rc.fas.harvard.edu/mirrors/R/') # USA
#options(repos='http://cran.ma.imperial.ac.uk/') # UK
#options(repos='http://brieger.esalq.usp.br/CRAN/') # Brazil


## Check necessary packages
necessary <- c('TinnR', 'svSocket')
installed =1)

## Load packages

## Uncoment the two lines below if you want Tinn-R to always start R at start-up
## (Observation: check the path of Tinn-R.exe)

## Set options

## Start DDE

.trPaths <- paste(paste(Sys.getenv('APPDATA'), '\\Tinn-R\\tmp\\', sep=''),
c('', 'search.txt', 'objects.txt', 'file.r', 'selection.r', 'block.r', 'lines.r'), sep='')

3. Now see check if you can send multiple lines of code!

Create a free website or blog at WordPress.com.