Displaying 20 results from an estimated 65 matches for "efficent".
Did you mean:
efficient
2009 Feb 11
4
Efficent way to create an nxn upper triangular matrix of one's
The code below create an nxn upper triangular matrix of one's. I'm
stuck on finding a more efficient vectorized way - Thanks. --Dale
n <- 9
data <- matrix(data=NA, nrow=n, ncol=n)
data
for (i in 1:n) {
data[,i] <- c(rep(1,i), rep(0,n-i))
}
data
2006 Jun 28
2
[LLVMdev] jump table ?
...bunch of these
addresses into an array, and then select
one to branch to. Eg. like a switch statement.
(i'm thinking also of GCC's computed goto's)
I'm finding the code generated by an llvm switch
is a big bunch of compares and jump instructions,
which i'm not sure is the most efficent way of
doing this.
GCC generates jump tables for big switches.
Simon.
2004 Nov 11
6
scan or source a text file into a list
I've ported somebody else's rather cumbersome Matlab model to R for
colleagues that want a free build of the model with the same type of I/O.
The Matlab model reads a text file with the initial parameters specified as:
C:\Data\Carluc\Rport>more Params.R
# Number of years to simulate
nYears = 50;
# Initial year for graphing purposes
year0 = 1970;
# NPP/GPP ratio (cpp0 unitless)
fnr =
1998 Sep 23
4
Start and stop the samba server
Is there a good way to stop and restart the samba server...
for example to have it re read the smb.conf, without rebooting the
actual pc?
if I should kill a process should I kill them all ??? if so is there an
efficent way to do this?
thanks in advance
Robert
2006 Mar 08
5
data import problem
...2);
The problem is that read.table closes the connection object, I assumed that it would not close the connection, and instead contines where it last stopped.
Since the data is nearly a simple table I though read.table could work rather than using scan directly. Any suggestions to read this file efficently are welcome (the file can contain several thousand record and each record can contain several thousand rows).
thanks a lot for your help,
+kind regards,
Arne
[[alternative HTML version deleted]]
2006 Mar 02
7
G729 and Meetme
I have noticed that when I try to connect multiple G729 VoIP devices into a MeetMe conference that I can only add up to the number of G729 licenses I have. Now I would think that because all the devices are G729, this wouldn't be the case and the only license that would ever be used would be if a non G729 device or Zap channel was a part of the Meetme conference. This is apparently note the
2012 Mar 09
2
anonymous "on demand" file transfers?
...we've gotten away with tar'ing
things up or using something like webfs (or Python -m SimpleHTTPServer) on
one end and 'wget -r http://remote-server' on the the other.
This can be anything from log files, to photoshop files, etc...
What I'm looking for though is something more efficent without creating
extrenuous files like 'index.html' (when using wget -r) or the like.
I'm aware of rsync having two modes.
One using "daemon" mode where rsync provides for file transfers using
it's own transport layer; and the paths have been predefined in either
/etc/rs...
2007 Nov 10
7
How to more efficently read in a big matrix
Dear list,
I need to read in a big table with 487 columns and 238,305 rows (row names
and column names are supplied). Is there a code to read in the table in
a fast way? I tried the read.table() but it seems that it takes forever :(
Thanks a lot!
Best,
Allen
2006 Apr 27
12
Stealing users IP address
Is there a functiaon to take the IP address of person who submits to a
form
example:
<input id="user_ip" name="user[ip]" type="hidden" value="<%=
some_ip_call %>" />
--
Posted via http://www.ruby-forum.com/.
2008 Jul 11
3
data summerization etc...
...)
#### compute mean finc within fid groups
tot_finc <- aggregate(cbind(fid,finc),list(fid),FUN=mean)
when I try to do it this way I get an error message telling me that enough
memory cannot be allocated ( I am using R 2.7.1 on Windows XP with 2 GB of
Memory). I figure that there must be a more efficent way to go about doing
this. Please suggest.
I would typically do this kind of task in a database and use SQL to push the
data around. I know RODBC allows you to write SQL to query external DBs. Is
there any mechanisim that allows you to write SQL queies against datasets
internal to R e.g. in the c...
2006 Jun 25
1
Sorting ferret results by column
...#39;'end_date'') and sort them
(by ''end_date''). ''end_date'' is a valid column in my "posts" table.
Here''s the code I have already:
@posts = Post.find_by_contents(params[:query])
params[:query] comes from a form. I am replacing less efficent code that
has the restrictions working :
@posts = Post.find(:all,
:conditions => [ ''(title LIKE :search_query OR body
LIKE :search_query) AND end_date >= :enddate'',
{:search_query => ''%'' + params[:query] + ''...
2008 Jul 14
1
Computing row means for sets of 2 columns
Is there a better or more efficent approach than this without the use of t() ?
> (m <- matrix(1:40, ncol=4)) [,1] [,2] [,3] [,4] [1,] 1 11 21 31 [2,] 2 12 22 32 [3,] 3 13 23 33 [4,] 4 14 24 34 [5,] 5 15 25 35 [6,] 6 16 26 36 [7,] 7 17 27 37 [8,] 8 18...
2001 Nov 26
1
rsync-ing compressed archives
Hi there!
I'm quite happily using rsync.
There is only one case where I couldn't figure out how to use it
efficently:
I sometimes have large compressed files (either .tar.gz or .zip) that
I need to keep synchronized. The exploded files are usually not
available on the machines i use for rsync (to keep everything unpacked
would mean wasting a lot of space on the server).
The problem is that even if I change slig...
2006 Jun 28
0
[LLVMdev] jump table ?
...(i'm thinking also of GCC's computed goto's)
llvm-gcc supports gcc's computed goto's. You can see what code it
generates.
> I'm finding the code generated by an llvm switch
> is a big bunch of compares and jump instructions,
> which i'm not sure is the most efficent way of
> doing this.
LLVM does support switch table emission, but only in certain modes. I
think it's only supported in non-pic codegen mode. Patches to improve
this would be welcome :)
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
2004 Sep 21
3
how to take this experiment with R?
How about:
x <- data.frame(matrix(rnorm(1550),c(50,31)))
model <- step(lm(x[,1] ~ as.matrix(x[,2:31])))
--Matt
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of rongguiwong
Sent: Monday, September 20, 2004 20:52 PM
To: r-help at stat.math.ethz.ch
Subject: [R] how to take this experiment with R?
This message uses
2006 Aug 24
1
Using a 'for' loop : there should be a better way in R
...e sums by work category. I
have gone at it with a brute force "for" loop approach
which seems okay as it is a small dataset. It looks
a bit inelegant and given all the warnings in the
Intro to R, etc, about using loops I wondered if
anyone could suggest something a bit simpler or more
efficent?
Example:
cat1 <- c( 1,1,6,1,1,5)
cat2 <- c( 1,2,3,4,5,6)
cat3 <- c( 5,4,6,7,8,8)
cat4 <- c( 1,2,1,2,1,2)
years <- c( 'year1', 'year2', 'year3', 'year3',
'year1', 'year1')
id <- c('a','a','b','c',&...
2003 May 12
1
Processor
...en the different families of processor.. and so you should be able to achieve a comparible performance using a Celeron processor at a far cheaper price..
The fault in my thinking may come in the voice compression/decompression and transcoding area where a Celeron may not be able to buffer the data efficently in which case a P4 would probably be all that is required..
I don't see the need to go to a Xeon.. based on the large price difference for a Xeon system vs a P4/Celeron system..
What are your thoughts??
--
______________________________________________
http://www.linuxmail.org/
Now with e-...
2008 Jul 11
1
data summarization etc...
...)
#### compute mean finc within fid groups
tot_finc <- aggregate(cbind(fid,finc),list(fid),FUN=mean)
when I try to do it this way I get an error message telling me that enough
memory cannot be allocated ( I am using R 2.7.1 on Windows XP with 2 GB of
Memory). I figure that there must be a more efficent way to go about doing
this. Please suggest.
I would typically do this kind of task in a database and use SQL to push the
data around. I know RODBC allows you to write SQL to query external DBs. Is
there any mechanisim that allows you to write SQL queies against datasets
internal to R e.g. in the c...
2010 Aug 21
2
t.tests on a data.frame using an apply-type function
...= "B" & x$status =="D",]$X2, x[x$site == "B" & x
$status =="L",]$X2)
t.test(x[x$site == "C" & x$status =="D",]$X2, x[x$site == "C" & x
$status =="L",]$X2)
etc...
I know I must be able to do this more efficently using a loop and one
of the apply functions, e.g. something like this:
k=length(levels(x$site))
for (i in 1:k)
{
site<-levels(x$site)[i]
x1<-x[x$site == site, ]
results[i]<-apply(x1, 2, function(x1) {t.test(x1[x1$status == "D",],
x1[x1$status == "L",])})
results...
2016 Nov 18
1
Good email client to use with Dovecot?
* lists at lazygranch.com <lists at lazygranch.com>:
> So does mutt suck or not?
If you work with vi and like it, chances are you will also like mutt.
Personally I *love* mutt! No extra fat. Always on the spot. It is "liberal in
what it receives and conservative in how it sends". Since it is command line
program, I can run it almost everywhere.
It supports local mailboxes,