similar to: read file with readBin (the file was saved with a C-routine)

Displaying 20 results from an estimated 110 matches similar to: "read file with readBin (the file was saved with a C-routine)"

2009 Apr 12
2
First Derivative of Data Matrix
I am really new to R and ran across a need to take a data matrix and calculate an approximation of the first derivative of the data. I am more than happy to do an "Excel" kind of calculation (deltaY/deltaX) for each pair of rows down the matrix, but I don't know how to get R to do that kind of calculation. I'd like to store it as a 3rd column in the matrix as well. My data
2012 Feb 14
1
method using several (and different) arguments in turn
Dear R-developers community, I have the following generic: setGeneric( name="newsample", def=function(x,y,z,a,b,c,...){standardGeneric("newsample")} And I can build several methods for this generic. One useful thing is to use "newsample" with only one of the 6 arguments listed. At the moment this is what I do: setMethod(
2005 Dec 29
2
Ajax.Request: onLoading executed after onComplete in IE
Hi, i''m trying to use a visual indicator for my Ajax requests. It''s based on the shopping cart demo at script.aculo.us and works great in Firefox, Konqueror and Opera, but fails in IE6. For some reason (timing problems?) onComplete is executed before onLoading, so the indicator is shown but not hidden when the request has finished. Oddly enough it works fine in the shopping
2003 Apr 09
3
plotting the lognormal density curve
I am trying to plot a lognormal density curve on top of an existing histogram. Can anybody suggest a simple way to do this? Even if someone could just explain how to plot a regular normal density curve on top of an existing histogram, it would be a big help. Also, is there some way to search through the R-help archives other than simple browsing? Thank you so much. Your help and time is greatly
2006 Feb 03
0
Contribute: Center extension to Prototype''s Position object
If anyone is intrested, i was hardly missing such a feature in prototype (for displaying well formatted error dialogs and things like that): Position.center = function(element){ var options = Object.extend({ zIndex: 999, update: false }, arguments[1] || {}); element = $(element) if(!element._centered){
2017 Nov 01
3
repeat a function
I want to populate the matrix prb through the function HWMProb <- function (a,j,dt) that encapsulates different functions (please see code below), using j= 0:2 for each j. It only populates prb if I specify each function independently in the global environment and then run the loop with the iF statement, as per below. for (j in 0:2) { if (j==0) { prb["0","1"] <-
2017 Nov 02
0
repeat a function
Hi Eric I did not see any answer and frankly speaking I cannot provide you with canned help. AFAIK if a function is defined within another function (which is your case) it cannot be called directly so it is necessary to define it in global environment. > fff <- function(x) { + myf <- function(a) a+2 + myf(x)^2} > > fff(5) [1] 49 > myf(5) Error in myf(5) : could not find
2017 Nov 02
2
repeat a function
Hi Petr, Many thanks for your response. Basically I want to create a probability matrix to be used in a trinomial tree going forward. This is the reason why I thought to build the matrix around 0 would be much more efficient. I need to loop through because the probabilities will depend on my node and is not always the same per row (e.g. if N> jmax, jmax being defined in another function) I
2017 Nov 03
0
repeat a function
Hi Well, I am not an expert in this field so I cannot comment your approach. I wanted only to point out that building matrix your way is like scratching your left ear with right hand, especially in R. What if you want increase size of your matrix? E.g. you use function ProbUP once for row "0" and than for rows different from jmax (if I correctly understand your code). Use of any
2009 Dec 04
2
Solve linear program without objective function
Dear R-users, i try to solve to following linear programm in R 0 * x_1 + 2/3 * x_2 + 1/3 * x_3 + 1/3 * x_4 = 0.3 x_1 + x_2 + x_3 + x_4 = 1 x_1, x_2, x_3, x_4 > 0, x_1, x_2, x_3, x_4 < 1 as you can see i have no objective function here besides that i use the following code. library(lpSolve) f.obj<-c(1,1,1,1) f.con<-matrix(c(0,2/3,1/3,1/3, 1,1,1,1,
2009 Aug 04
2
Caculate first difference from a dataframe; write a simulation
Dear R Users I'm writing my first simulation in R. I've put across my problems with a smaller example in the attachment along with the questions. Please help. Best regards Meenu -------------- next part -------------- mydat<-read.table(textConnection("Level spread change State 4.57 1.6 BlF NA 4.45 2.04 BrS NA 3.07 2.49 BlS NA 3.26 -0.26 BlF NA 2.80 0.22 BrF NA 3.22 2.5 BrS NA
2009 Aug 05
1
writing a simulation
No its not an or condition. Please see the changed attachment. Many thanks for your help. Regards Meenu On Wed, Aug 5, 2009 at 6:36 PM, David Winsemius <dwinsemius at comcast.net>wrote: > > On Aug 4, 2009, at 2:12 PM, Meenu Sahi wrote: > > Dear R Users >> >> I'm writing my first simulation in R. >> I've put across my problems with a smaller example
2009 Jul 02
2
Using sapply to build a count matrix
Dear All, I am new to R and slowly learning how to use the system. The following code is an exercise I was trying. The intent is to generate 10 random samples of size 5 from a vector with integers 1:10 and 2 missing values. I then want to generate a matrix, for each sample which shows the frequency of missing values (NA) in each sample. My solution, using sapply is at the end. If anyone has the
2006 Feb 18
0
Move element into view
Hello, I am in fly-by mode as I am still more than busy, so I just dumb this one out for anyone interested. Adapt it for your needs if you like it. This effect is similar to ScrollTo, but scrolls the viewport vertically the minimal amount necessary to bring the element into view. Usage: new Effect.ScrollToFullView(element, {duration: 0.6, offset: 10}); Offset is the distance in pixel to the
2009 Sep 15
2
best method to format output of frequency table
I have some security alert log data that I'm parsing and doing some stats on. One of the fields is the "Classtype" which is the enumerated value of the type of alert found. classtypes = factor( alerts$Classtype ) fclass_types = table( classtypes ) fclass_types gives me a frequency table of the intrusion types: fclass_types classtypes
2012 Jan 20
2
Regarding Pubkey Enumeration
HD Moore from MetaSploit has noted that, given a pubkey (and not the corresponding private key, as might be found in authorized_keys), he can determine if he'd be able to log into an account. It's a small thing, but he's using it for very interesting recon/deanonymization. He'll be releasing a paper shortly, not overplaying the characteristic, but certainly showing it can be used
2013 Mar 30
0
Scoping issue with irf() from {vars}
Dear all: There seems to be a problem with scoping, for irf() in vars, when called within a function. Try the following: ----------------------- testfun <- function(lags){ data(Canada) var.2c <- VAR(Canada, p = lags, type = "const") print(var.2c) } testfun(lags=3) ## Everything OK. Now this: testfun2 <- function(lags){ data(Canada) var.2c <- VAR(Canada, p = lags, type =
2019 Mar 06
2
CentOs 7 i386 & PAE Kernel
On 3/6/19 1:28 PM, Johnny Hughes wrote: > On 3/6/19 6:26 AM, Mike McTernan (wavemobile) wrote: > > On 3/5/19 5:48 PM, Johnny Hughes wrote: <snip> > > Last question, if I may - Is there any specific reason why an i686 PAE > > kernel built from the main RHEL sources isn't in the AltArch i386 os- repo? > > > > Notably CentOS 6 provided both non-PAE and
2008 Jan 16
3
Rmpi on Linux x86_64 GNU/Linux
I'm having trouble with R CMD INSTALL Rmpi_0.5-5.tar.gz --configure-args=~/lam lam is is installed locally. lamboot -d (or lamboot-d and also recon) works. make -k check from the lamtest suite passes all tests. Is this is problem with the -fPIC compiler as in the message? Should it be modified in the Makefile? Any help or comments are appreciated, thanks. * Installing to library
2002 Feb 16
1
Newbie Trying To Get Ghost Recon To Install
Hello, I'm new to using WINE (and to these lists), so I apologize if this has been asked and answered already: Has anyone been able to get Ghost Recon to at least install? The autorun program came up just fine, but when I click the button to install, it promptly quits. I tried running the setup.exe program directly, and it gets as far as trying to setup and install shield wizard, and then