search for: zfang

Displaying 12 results from an estimated 12 matches for "zfang".

Did you mean: fang
2009 Jan 12
1
Loading workspaces from the command line
Hi, Is there any way to load workspaces (e.g. stuff from save.image) from the command line? I'm on Linux, and would find this very helpful. I'm guessing this functionality can be duplicated with a skillful bash script to rename the particular file to .RData (and then back once R terminates), but I'm wondering if there's a better way. Zhou Fang
2012 May 08
1
Fast reading of hex data?
Hi all, Basically, I have data in the format of (up to 1 gig in size) text files containing stuff like: F34060F81000F28055F8A000F2E05EF8F000F34 (...) The data is basically strings denoting hex values (9 = 9, A = 10, B = 11, ...) organised in fixed, small blocks. What I want to do is to read in a specified segment of the string, break it up into blocks, and convert it into a vector of integers
2009 Jun 01
1
installing sn package
...ructions in each message header: List-Unsubscribe: <https://stat.ethz.ch/mailman/options/r-help>,     <mailto:r-help-request@r-project.org?subject=unsubscribe> Duncan Murdoch ------------------------------ Message: 118 Date: Thu, 28 May 2009 01:36:13 +0100 From: Zhou Fang <zhou.zfang@gmail.com> Subject: [R] Replace is leaking? To: r-help@r-project.org Message-ID:     <b19557450905271736g559a6142w37259d0d23a44e35@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Okay, someone explain this behaviour to me: Browse[1]> replace(rep(0, 4000), temp1[12] , temp...
2009 Jan 28
2
t.test in a loop
Hi All, I've been having a little trouble with creating a loop that will run a a series of t.tests for inspection, Below is the code i've tried, and some checks i've looked at. I've used the get(paste()) idea as i was told previously that the use of the eval should try and be avoided. I've run a single syntax to check that my systax is correct and works without any problems
2008 Oct 22
1
Inserting blank lines into a file
Hi, Should be a quickie: I want to make a datafile in R for plotting in gnuplot (which has friendlier 3D plotting options, as far as I can tell). So, I want to create a file with contents along the lines of #File begins 0 0 10 0 13 10 0.2 2 10 1 0 10.12 1 1 5 1 2 10 2 0 10 2 1 1 2 2 10 It's probably fairly easy to write the space-separated numbers with write.table, sink, or similar. But
2009 Jan 27
0
Pausing processing into an interactive session
Hi all, As a possibly silly request, is it possible to interactively pause a R-calculation and do a browser(), say, without browser or other debug handlers being explicitly included in the code? Imagine the following situation: You write up a big calculation for R to calculate. We are talking hours here, or worse. A few hours into the calculation, you decide that you want to check on how
2009 Feb 06
1
Finding a basis in a set of vectors
Hi, Okay, I have a n x p matrix X, which I know is not full rank. In particular, there may be linear dependencies amongst the columns (but not that many). What is a fast way of finding a linearly independent subset of the columns of X that will span the column space of X, in R? If it helps, I have the QR decomposition of the original X 'for free'. I know that it's possible to do this
2009 Mar 11
0
Bias correction for random forests?
Hi, Way back in 2004, an update to randomForest added an option 'corr.bias'. The explanation was a bit vague, but it turns out it improves RF's predictive fit with my data substantially. But I am having trouble understanding it. Does anyone know what this 'bias correction' actually does? Or what the justification for it is? Or when it would be necessary? Is there a paper
2009 Mar 23
0
Scaled MPSE as a test for regressors?
Hi, This is really more a stats question than a R one, but.... Does anyone have any familiarity with using the mean prediction squared error scaled by the variance of the response, as a 'scale free' criterion for evaluating different regression algorithms. E.g. Generate X_train, Y_train, X_test, Y_test from true f. X_test/Y_test are generated without noise, maybe? Use X_train, Y_train
2009 May 28
2
Replace is leaking?
Okay, someone explain this behaviour to me: Browse[1]> replace(rep(0, 4000), temp1[12] , temp2[12])[3925] [1] 0.4462404 Browse[1]> temp1[12] [1] 3926 Browse[1]> temp2[12] [1] 0.4462404 Browse[1]> replace(rep(0, 4000), 3926 , temp2[12])[3925] [1] 0 For some reason, R seems to shift indices along when doing this replacement. Has anyone encountered this bug before? It seems to crop up
2012 May 08
0
Seek() on windows - safe use cases?
So, I'm maintaining some else's code, which is as always, a fun thing. One feature of this code is the use of the 'seek' command. In ?seek: We have found so many errors in the Windows implementation of file positioning that users are advised to use it only at their own risk, and asked not to waste the R developers' time with bug reports on Windows'
2009 Feb 15
2
Fast ave for sorted data?
Hi, This is probably really obvious, by I can't seem to find anything on it. Is there a fast version of ave for when the data is already sorted in terms of the factor, or if the breaks are already known? Basically, I have: X = 0.1, 0.2, 0.32, 0.32, 0.4, 0.56, 0.56, 0.7... Y = 223, 434, 343, 544, 231.... etc of the same, admittedly large length. Now note that some of the values of X are