similar to: Text (eg. summary) to text file, Howto?

Displaying 20 results from an estimated 900 matches similar to: "Text (eg. summary) to text file, Howto?"

2008 Jun 10
2
How to join data.frames and vectors of different length, in an inteligent way?
I have a data set something like this: "YYYY", "Value" 1972 , 117 1984 , 73 1969 , 92 1976 , 113 1999 , 80 1996 , 78 1976 , 98 1984 , 106 1976 , 99 it could be created with: > dafSamp <- data.frame(cbind(c(1972,1984,1969,1976,1999,1996,1976,1984,1976),c(117,73,92,113,80,78,98,106,99))) The real dataset is of cause much larger, app. 100.000 samples
2011 Jan 27
1
normalizing prizes to a specific year - how to?
Dear list I have a large data frame with house prices. Prices have been converted to price per m2, to be able to compare. Prices are spread over almost 10 years, each price is tagged with the year it relates to. I would like to 'normalize' all the prices to, eg. 2010 prices. The data frame looks like this > head(dafP) Y P 1 2004 11199.60 2 2005 15310.10 3 2005 19491.50 4
2007 Sep 01
2
Comparing "transform" to "with"
Hi All, I've been successfully using the with function for analyses and the transform function for multiple transformations. Then I thought, why not use "with" for both? I ran into problems & couldn't figure them out from help files or books. So I created a simplified version of what I'm doing: rm( list=ls() ) x1<-c(1,3,3) x2<-c(3,2,1) x3<-c(2,5,2)
2008 May 21
3
Converting a 'difftime' to integer - How to???
I want to find the DOY (Day of Year) of some dates. I think to substract the date 1. January from the data to achive this. Something like: > d <- as.Date("2006-03-13") - as.Date("2006-01-01") +1 > d Time difference of 72 days So far so good. But d is a 'difftime' object. How do I get an Integer value from that? I tried severel things, incuding the
2004 Jun 29
2
Calculate correctly, but gives an error message
Hi! I will calculate sum??s in the following way: E.g.: a <- rpois(100,20) b <- rpois(100,5) x <- data.frame(cbind(a,b)) # the sum??s should be calculated based on a. attach(x) sort.nace <- unique(sort(x[,1])) sum1 <- matrix(ncol=1, nrow=length(sort.nace)) # I calculate the sum of all values of b, which have the same category in a. Eg.: sum1[1,] <- sum(subset(x,
2016 May 04
2
GVN pass: does global value numbering remove duplicate computations in loops?
Hello, I was hoping to get some clarification on the aim of the GVN pass. I have been reading a bit about global value numbering, and from what I understand, there are polynomial time algorithms for removing duplicate computations from loops[1]. I have an example program[2] which computes the sum of an array twice, in two separate accumulators. Here, sum0 and sum1 are both sums of the array A.
2002 Nov 25
2
Q: Segmentation fault at all commands ?
Dear List Sorry if this is trivial, but I can't find it in the manual, FAQ or mail list (2002). I just installed R 1.6.0 (2002-10-01) on Linux R.H. 7.2 (2.4.9-32.5) on an DIGITAL AlphaServer 800 5/500 The program starts up nicely but exits immediately with a "Segmentation fault" at the first command. It seems that it doesn't matter what command, I tried q(), help(), version,
2006 Nov 03
2
Installing a package - and making it work?
Dear list - Propoerly a beginner question, so bare with my frustration... I tried install the 'shapefiles' package into R 2.4.0 but it seems that the install had little effect... > install.packages(c("shapefiles")) --- Please select a CRAN mirror for use in this session --- trying URL
2008 Apr 22
4
how to convert non numeric data into numeric?
I am having the following error in my function function(theta,reqdIRR) { theta1<-theta[1] theta2<-theta[2] n<-length(reqdIRR) constant<- n*(theta1+theta2) sum1<-lapply(reqdIRR*exp(theta1),FUN = sum) sum2<-lapply(exp(theta2 - reqdIRR*exp(theta1)),FUN = sum) sum = sum1 + sum2 log.fcn = constant - as.numeric(sum) result = - log.fcn return(result) } *error :
2007 Feb 01
3
Help with efficient double sum of max (X_i, Y_i) (X & Y vectors)
Greetings. For R gurus this may be a no brainer, but I could not find pointers to efficient computation of this beast in past help files. Background - I wish to implement a Cramer-von Mises type test statistic which involves double sums of max(X_i,Y_j) where X and Y are vectors of differing length. I am currently using ifelse pointwise in a vector, but have a nagging suspicion that there is a
2010 Sep 24
2
grep contents of file on remote server
Hello, I am attempting to grep the contents of a key file I have SCP'd to a remote server. I am able to cat it: [code] [bluethundr at LBSD2:~]$:ssh root at sum1 cat /root/id_rsa.pub root at lcent01.summitnjhome.com's password: ssh-rsa
2014 Sep 29
2
[LLVMdev] Alias Analysis across functions
Hi, I am trying to get the alias info for the following code. The alias analysis returns "MayAlias" for arrays "A" and "B" in both the functions instead of "NoAlias". What passes should I run in opt before the alias analysis pass to get the accurate result? Example: //Note: static and called by func() only. static int sum(int *A, int *B) { int i = 0,
2008 Nov 26
1
SSE2 code won't compile in VC
Jean-Marc, At least VS2005 (what I'm using) won't compile resample_sse.h with _USE_SSE2 defined because it refuses to cast __m128 to __m128d and vice versa. While there are intrinsics to do the casts, I thought it would be simpler to just use an intrinsic that accomplishes the same thing without all the casting. Thanks, --John @@ -91,7 +91,7 @@ static inline double
2013 Mar 25
2
Faster way of summing values up based on expand.grid
Hello! # I have 3 vectors of values: values1<-rnorm(10) values2<-rnorm(10) values3<-rnorm(10) # In real life, all 3 vectors have a length of 25 # I create all possible combinations of 4 based on 10 elements: mycombos<-expand.grid(1:10,1:10,1:10,1:10) dim(mycombos) # Removing rows that contain pairs of identical values in any 2 of these columns: mycombos<-mycombos[!(mycombos$Var1
2018 Mar 16
3
Discrepancy: R sum() VS C or Fortran sum
Hi all, I found a discrepancy between the sum() in R and either a sum done in C or Fortran for vector of just 5 elements. The difference is very small, but this is a very small part of a much larger numerical problem in which first and second derivatives are computed numerically. This is part of a numerical method course I am teaching in which I want to compare speeds of R versus Fortran (We
2018 Mar 16
1
Discrepancy: R sum() VS C or Fortran sum
My simple functions were to compare the result with the gfortran compiler sum() function. I thought that the Fortran sum could not be less precise than R. I was wrong. I am impressed. The R sum does in fact match the result if we use the Kahan algorithm. P. I am glad to see that R sum() is more accurate than the gfortran compiler sum. On 16/03/18 11:37 AM, luke-tierney at uiowa.edu wrote:
2012 Jun 04
1
simulation of modified bartlett's test
Hi, I run this code to get the power of the test for modified bartlett's test..but I'm not really sure that my coding is right.. #normal distribution unequal variance asim<-5000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) n1<-20 n2<-20 n3<-20 mu<-0 sd1<-sqrt(25) sd2<-sqrt(50) sd3<-sqrt(100) g1<-rnorm(n1,mu,sd1) g2<-rnorm(n2,mu,sd2)
2017 Oct 12
2
[GlobalISel] [X86] unable to legalize instruction
Thanks for your quick reply. Here its is: =========== ; ModuleID = 'simple_foo.c' source_filename = "simple_foo.c" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.13.0" ; Function Attrs: noinline nounwind optnone ssp uwtable define i32 @foo(i32 %a, i32 %b, i32 %c) #0 { entry: %retval = alloca i32, align
2017 Oct 12
1
[GlobalISel] [X86] unable to legalize instruction
I believe if you pass(iirc) -pass-remarks-missed=“gisel-*”, it’ll print the instruction it failed to legalize. Sent from my iPhone > On Oct 11, 2017, at 6:44 PM, S. Bharadwaj Yadavalli via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Thanks for your quick reply. > > Here its is: > > =========== > > ; ModuleID = 'simple_foo.c' > source_filename
2002 Jan 13
1
rsynd-2.5.1 / batch.c patch
Platform: Compaq OpenVMS Alpha 7.3 Compiler: Compaq C T6.5 The following patch is an update to a previous patch that I submitted. The only change from the previous patch is that the const qualifier has been added to write_batch_*() routines to improve compiler efficiency. Because the gdiff -u was done against the distribution it includes the previous patch. The functions with no parameters