similar to: any way to make the code more efficient ?

Displaying 20 results from an estimated 90 matches similar to: "any way to make the code more efficient ?"

2006 Nov 14
2
putting a column name on a zoo object
does anyone know how to put a column name on a zoo object. I think achim and gabor are off line or they have gotten totally tired of me an decided to ignore me ( which is totalyy understandable ). logbidask<-log((aggfxdata[,"bid"] + aggfxdata[,"ask"])/2.0) logbidask doesn't have a name and I can't figure out how to get one on it ? aggfxdata is a zoo object.
2006 Oct 31
3
plotting question
i have the following code below and at the end there are some plotting statements. it actualy looks quite nice when you run it but there is just one strange thing happening that don't know how to fix. the three things being plotted are aggfxdata[,logbidask] which has its own set of times ( it's a zoo object ). rollmeanlogbidask which has a subset of the times that aggfxdata has.
2006 Nov 21
1
Is there any way to know when a field is blank
I have many text files in the format below and in certain rare instances such as below there can be nothing in one of the fields so a double comma is written but I won't know this because I am reading in many,many files sequentially. # TEXT FILE 2004-02-10 00:01:31.00000,,105.60000000 2004-02-10 00:01:32.00001,,105.60000000 2004-02-10 00:01:45.00000,,105.60000000 2004-02-10
2006 Oct 28
1
labelling of horizontal axis in acf function
this one is not a false alarm like my previous message. i have cut and paste the code below so if anyone could run it would be appreciated. basically, my question is why the horizontal axis of the acf plot is labelled with such huge numbers when the labels should be 1 through 10 since may lag.max = 10 ? i looked at the cdoe of acf but it was pretty much beyond me. i think it has something to
2004 Aug 10
2
out of memory in receive_file_entry rsync-2.6.2
Hello, I've had some problems using rsync to transfer directories with more than 3 million files. Here's the error message from rsync: <snip> ERROR: out of memory in receive_file_entry rsync error: error allocating core memory buffers (code 22) at util.c(116) rsync: connection unexpectedly closed (63453387 bytes read so far) rsync error: error in rsync protocol data stream (code
2010 Aug 10
1
maildirsize having incorrect content, how to recreate/correct?
Hi List, I have (otherwise successfull) migrated a server from cyrus to dovecot (Mac OS X Server 10.5.8 to 10.6.4 [dovecotd version to be 1.1.20apple0.5]). There are ca. 300+ users of which a very small handfull (ca. 1 %) are having reported a usage size that is very different to what 'du' reports. How can I rebuild the maildirsize and why might it be wrong in the first place(?) Will the
2007 Mar 27
0
Error when calling residual.plots() on an ANOVA object
Dear *, I have to perform an ANOVA analysis to study the effects on the performance of some algorithmic components in the design of my algorithm. I have done a full factorial design for the following 5 factors (my response variable is "best"): $ model :'data.frame': 3360 obs. of 6 variables: ..$ best : num [1:3360] 0.108 0.573 0.625 1.057 0.451 ...
2011 Jan 06
8
Accessing data via url
# Can anyone suggest why this works datafilename <- "http://personality-project.org/r/datasets/maps.mixx.epi.bfi.data" person.data <- read.table(datafilename,header=TRUE) # but this does not? dd <- "https://sites.google.com/site/jrkrideau/home/general-stores/trees.txt" treedata <- read.table(dd, header=TRUE)
2011 Mar 23
2
) Error in eval(expr, envir, enclos) : object '' not found
> datafilename="E:/my documents/r/sex/bysex1.csv" > data.sex=read.table(datafilename,header=T) > data.sex y.sex.age.region.c.n 1 1980,F,A,N,-18.15,13.61 2 1980,F,A,N,-18.61,13.04 3 1980,F,A,N,-18.81,12.32 4 1990,F,A,N,-21.12,11.7 5 1990,F,A,N,-20.77,11.58 6 1990,F,A,N,-21.6,13.34 7 1990,F,A,N,-21.78,12.6 > model.anova<-aov(c~age*sex,data=data.sex)
2010 Sep 20
2
interpreting one-way anova tables
Hi, I am trying to reconcile anova table in R (summary(lm)) with individual t.test. datafilename="http://personality-project.org/R/datasets/R.appendix1.data" data.ex1=read.table(datafilename,header=T) #read the data into a table summary(lm(Alertness~Dosage,data=data.ex1)) gives: Call: lm(formula = Alertness ~ Dosage, data = data.ex1) Residuals:    Min     1Q Median     3Q    Max
2012 Jan 15
0
Reading MINE output into a matrix
I've benefited from this list with input on how to build up a symmetrical matrix. The purpose of that query was to work with the output from the MINE routine posted at www.exploredata.net To the extent it helps others, here is the script that I was working on an which turns a given MINE output column (in the case below, the third column corresponding to "MIC") into a matrix.
2010 May 10
1
how to get p-value from ave
Hi there, I checked google for aov. usually one uses summary to see whether the p-value is small. but I want to put aov in my script. how can I get the p-value, (0.1115, 0.6665, 0.6665 in the following example)? thanks YU > datafilename="http://personality-project.org/r/datasets/R.appendix2.data" > data.example2=read.table(datafilename,header=T) > aov.ex2 =
2012 Jun 10
1
compute Mcdonald's omega ω
Dear all I am a newbie to R and I would appreciate it very much if someone can give me some advice on this. Please note that I am not a programmer so some of the questions might sound really stupid. I would like to compute McDonald's omega calculation using R, I'm aware I can use the omega function in the psych package. But I'm really not sure how to do it. I have read these two
2009 Nov 08
2
Simple 2-Way Anova issue in R
Hello, I'm new to R and have been following many guides including the two-way anova (http://www.personality-project.org/r/r.anova.html). Using that walkthrough including the supplied data I do str(data.ex2) and receive the appropriate types of data as follows: > str(data.ex2) 'data.frame': 16 obs. of 4 variables: $ Observation: int 1 2 3 4 5 6 7 8 9 10 ... $ Gender :
2004 Jun 17
2
Question on lists and vectors of lists
I have an elementary programming question. Could someone please point me in the right direction? I have a function which will run for thousands of companies. At each invocation, it returns 2 numbers. I plan to do something like: think_one_firm <- function(filename) { # Do stuff return(list(x=x,y=y)) } So for each of the firms in my dataset, I will call
2010 Jan 06
2
problem with strptime and 2010 dates
Hi, I'm reading data from a text file and transforming it in R and my date column seems to be getting corrupted. Can someone point out what's wrong? This code worked fine until I added a new date in 2010. thank you. To load the data I run: work_table = read.table(datafilename,header=TRUE) #read the data file attach(work_table)
2001 Oct 23
1
HOMM3 and DirectPlay
Using a recent build of wine (20011023 and previous) I've gotten heroes of might and magic 3 working, minus networking :/ After doing a full install in WINE (with fake windows), attempting to run the game came up with the 'unable to initialize resources - possible disk problem'. Examination of the output of wine --debugmsg +relay,+text,+string Heroes3.exe indicates that the game is
2006 Jul 28
2
negative binomial lmer
To whom it may concern: I have a question about how to appropriately conduct an lmer analysis for negative binomially distributed data. I am using R 2.2.1 on a windows machine. I am trying to conduct an analysis using lmer (for non-normally distributed data and both random and fixed effects) for negative binomially distributed data. To do this, I have been using maximum likelihood,
2006 Oct 18
0
(no subject)
I currently have an instance of R running on Solaris 8 Version 2.2.0 (2005-10-06 r35749) Package: its Version: 1.0.9 Package: Hmisc Version: 3.0-1 I decided to build a new install on Linux RedHat As4.0 32 Bit running R version 2.4.0 (2006-10-03) Package: its Version: 1.1.4 Package: Hmisc Version: 3.1-1 Package: chron Version: 2.3-8 I am using the library(its) on both machines and
2024 Mar 22
1
Error message
Hi all, I am creating an X1.RData file using the R 4.2.2 library. x1.R save(datafilename, file="X1.RData") When I am trying to load this file using another script X2.R load("X1.RData") I am getting this error message: Error in load("X1.RData", : bad restore file magic number (file may be corrupted) .. no data loaded. I am using the same R library (R