Displaying 20 results from an estimated 3240 matches for "orig".
Did you mean:
org
2010 Jan 26
1
splitting a factor column into binary columns for each factor
Yesterday I posted the following question (my apologies for not putting a subject line):
=================question======================
Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks.
options(stringsAsFactors=FALSE)
orig <- c(rep('11111111',100000),rep('22222222',200000),rep('33333333' ,300000),rep('44444444',400000))
orig.unique <- unique(orig)
system.time(df <- as.data.frame(sapply(orig.unique, function(x) ifelse(orig==x, 1, 0))))
=====================================...
2010 Jan 26
0
splitting a factor column into binary columns for each level
Yesterday I posted the following question (my apologies for not putting a subject line):
=================question======================
Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks.
options(stringsAsFactors=FALSE)
orig <- c(rep('11111111',100000),rep('22222222',200000),rep('33333333' ,300000),rep('44444444',400000))
orig.unique <- unique(orig)
system.time(df <- as.data.frame(sapply(orig.unique, function(x) ifelse(orig==x, 1, 0))))
=====================================...
2007 Dec 03
2
Why is the program too slow?
...Fisher's alpha from counts of individuals and species.
# Note that this program assumes that the true value of alpha lies within the range 0.001¨C10000
# (a likely assumption for local assemblages of organisms).
# The function returns "-1" if there is a problem.
calc.alpha=function(n.orig, s.orig)
{
a=numeric()
len.n=length(n.orig)
len.s=length(s.orig)
if(len.n != len.s)
{ return(-1) }
for(i in 1:len.n)
{
if(n.orig[i]<=0 | s.orig[i]<=0 | n.orig[i]<=s.orig[i])
{ a[i]=(-1) }
else
{
low.a=0.001
high.a=10000...
2010 Jan 25
2
(no subject)
Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks.
options(stringsAsFactors=FALSE)
orig <- c(rep('11111111',100000),rep('22222222',200000),rep('33333333',300000),rep('44444444',400000))
orig.unique <- unique(orig)
system.time(df <- as.data.frame(sapply(orig.unique, function(x) ifelse(orig==x, 1, 0))))
2012 Jan 06
2
Dropping columns from data frame
...e.g. why doesn't the column
formerly-known-as-4 become 3 after column 1 is dropped: doesn't vector
removal from a df/list invoke a loop in C?). Can I delete a named
list of columns, which are examples 4 and 5 and which generate the
"unary error' mesages, without resorting to "orig.df$num1.10 <- NULL"?
Thanks!
orig.df <- data.frame(cbind(
1:10
,11:20
,letters[1:10]
,letters[11:20]
,LETTERS[1:10]
,LETTERS[11:20]
))
names(orig.df) <- c(
'num1.10'
,'num11.20'
,'lc1.10'
,'lc11.20'
,'uc1.10'
,'uc11.20'
)...
2004 Oct 29
1
Giving column names to a matrix
Heloo,
I have the following problem:
orig.data <- NULL
Inside a loop I have instructions like:
orig.data <- rbind(orig.data, ...)
After that I do:
colnames(orig.data)<-c('Data','InicioViagem', ...)
Everything works fine.
For example, the first line of the matrix is:
> orig.data[1,]
Data InicioViagem...
2015 Sep 03
1
Doubts on incremental backup and command repetition
Hi,
I am trying to use rsync for incremental backup and I am facing some issues. I would like to ask your help to understand what is going on and have the proper command line.
1) my goal is
I the following folders:
./dest:
file3.txt
./orig:
file1.txt file10.txt file2.txt file20.txt
And I would like to have as incremental backup
./dest:
backup file1.txt file2.txt file3.txt
./dest/backup:file1.txt file10.txt file2.txt file20.txt
./orig:
file1.txt file10.txt file2.txt file20.txt
However, I got the following....
2016 May 26
0
Samba 4.4.3 debian wheezy backport intructions
...docs/debian)
mkdir -p /var/www/htdocs/debian/wheezy
mv *.deb /var/www/htdocs/debian/wheezy
cd /var/www/htdocs/debian/
dpkg-scanpackages wheezy /dev/null | gzip -9c > wheezy/Packages.gz
7. Include repo and add pinning to prefere the local repo
Create /etc/apt/preferences with
Package: *
Pin: origin ""
Pin-Priority: 995
Create /etc/apt/sources.list/local.list with
deb file:/root/samba/packages/ wheezy/
8. Install samba
aptitude install samba
You may verify it grabs your local version first with
apt-cache policy samba
Should output something like:
samba:
Installiert:...
2016 Jul 13
2
[LLVM/Clang v3.8.1] Missing Git branches/tags and source-tarballs?
On Wed, Jul 13, 2016 at 04:48:51PM +0200, Sedat Dilek via llvm-dev wrote:
> [ CCed all people who were involved in this thread ]
>
> Hi Tom,
>
> personally, I am interested to test the prebuilt-toolchains for
> Ubuntu/xenial alias 16.04 LTS and Debian/Jessie v8.5.0 AMD64.
> The available toolchains are incomplete and thus useless.
>
> Just as a fact: There is still no
2006 Jun 02
0
Re: Update libtheora-1.0alpha6
...$datadir/doc/libtheora-alpha6
Best regards. God illuminate us.
--
Dios, por favor, ayudanos a hacer Tu voluntad que es felicidad desbordante.
http://www.primarilypublicdomain.org/letter/
--
Vladimir T?mara Pati?o.
http://www.geocities.com/v-tamara
diff -pruN --exclude=CVS ../libtheora.orig/Makefile ./Makefile
--- ../libtheora.orig/Makefile Wed May 31 08:29:37 2006
+++ ./Makefile Fri Jun 2 08:18:32 2006
@@ -1,11 +1,9 @@
# $OpenBSD: Makefile,v 1.3 2005/12/30 05:35:56 jakemsr Exp $
COMMENT= "open video codec"
-DISTNAME= libtheora-1.0alpha4
-PKGNAME= ${DISTNAME}p0
+DISTNAM...
2002 Dec 19
2
list to data.frame
R Help-
I have a list of 102 vectors all of the same type and length called
time.by.orig. I can't data.frame(time.by.orig) but I can
data.frame(time.by.orig[1:length(time.by.orig)]). Why is this? Thanks for
your help.
str(time.by.orig)
List of 102
$ 1 : num [1:102] 1.34 17.39 14.36 14.22 7.56 ...
$ 2 : num [1:102] 17.5 0.7 17.7 12.4 10.4 ...
$ 3 : num [1:102] 14.063 1...
2002 Dec 18
2
patch for openssh3.5p1 - adds logging option
...onfig. it just logs messages
directly to a file instead of stderr or syslog. the largest change
is an additional argument to log_init() in log.c for the log file name
(and then changes to the rest of the tools to add a NULL arg).
galt
-------------- next part --------------
diff -urN openssh-3.5p1-orig/log.c openssh-3.5p1/log.c
--- openssh-3.5p1-orig/log.c 2002-12-18 10:10:13.000000000 -0500
+++ openssh-3.5p1/log.c 2002-12-18 11:51:24.000000000 -0500
@@ -40,6 +40,7 @@
#include "xmalloc.h"
#include <syslog.h>
+#include <time.h>
static LogLevel log_level = SYSLOG_LEVEL_...
2010 Mar 25
1
Error using Rcpp
...am trying to use the Rcpp package. I am testing it using a
simple code that takes in a vector and adds 1 to each element:
#include <Rcpp.h>
// This file takes in a vector and adds one to each entry
RcppExport SEXP addone(SEXP vec){
// create a local copy of vec
Rcpp::NumericVector orig(vec);
// create an output vector
Rcpp::NumericVector vecout(orig.size());
for(i=0;i<orig.size();i++) {
vecout[i] = orig[i]+1;
}
Rcpp::Pairlist
res(Rcpp::Named("result",vecout),Rcpp::Named("original",orig));
return res;
}
I then try to use...
2007 Feb 16
5
LVM on dom0?
...b
quiet
initrd /initrd-2.6.9-42.0.8.EL.img
title CentOS-4 i386 (2.6.9-42.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-42.EL.img
For my root assignment in the XEN definition I''ve treid what was originally
suggested and kept it the same as the other kernels
(root=/dev/VolGroup00/LogVol00) as well as what I had seen in someone elses
config and what my current configuration shows
(root=/dev/mapper/VolGroup00-LogVol00). I used the initrd created when I did
the initial install of Xen as well I crea...
2005 Aug 24
0
verbose imap logging
...laas at data.slu.se
Department of Computer Services, SLU Phone: +46 18 67 35 15
Vindbrov?gen 1
P.O. Box 7079
S-750 07 Uppsala
SWEDEN
-----------------------------------------------------------------------
-------------- next part --------------
diff -ur dovecot-1.0.alpha1.orig/src/imap/client.c dovecot-1.0.alpha1/src/imap/client.c
--- dovecot-1.0.alpha1.orig/src/imap/client.c 2005-07-03 23:32:21.000000000 +0200
+++ dovecot-1.0.alpha1/src/imap/client.c 2005-08-23 10:39:08.000000000 +0200
@@ -56,10 +56,22 @@
return client;
}
-void client_destroy(struct client *client)...
2002 Oct 05
2
ogg123 remote interface
...ng actually).
This option is also available in mpg123, so this adds compatibility.
add-test-option.patch
This patch adds the -t option. This is identical to '-d null' but this
makes it more compatible to mpg123.
-------------- next part --------------
diff -urN -X diff.ignore ogg123.orig/file_transport.c ogg123/file_transport.c
--- ogg123.orig/file_transport.c Sat Jan 26 12:06:37 2002
+++ ogg123/file_transport.c Sat Oct 5 13:48:31 2002
@@ -21,7 +21,7 @@
#include "transport.h"
#include "i18n.h"
-
+#include "status.h"
typedef struct file_private_...
2009 Jan 16
1
specifying model terms when using predict
...haps
others have encountered this problem as well.
The code below illustrates the issue.
######
## linear model example
# this works
x<-1:100
y<-2*x
lm1<-glm(y~x)
pred1<-predict(lm1,newdata=data.frame(x=101:150))
## so does this
x<-1:100
y<-2*x
orig.df<-data.frame(x1=x,y1=y)
lm1<-glm(y1~x1,data=orig.df)
pred1<-predict(lm1,newdata=data.frame(x1=101:150))
## this does not run
x<-1:100
y<-2*x
orig.df<-data.frame(x1=x,y1=y)
lm1<-glm(orig.df$y1~orig.df$x1,data=orig.df)
pred1<-predict(lm1,newdata=data....
2003 Oct 08
4
OS/390 openssh
...on?
I *tried* to make it not-too-ugly, at least... ;-)
Cheers,
Martin Kraemer
--
<Martin.Kraemer at Fujitsu-Siemens.com> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730 Munich, Germany
-------------- next part --------------
diff -bur openssh-3.7.1p2.orig/auth.c openssh-3.7.1p2/auth.c
--- openssh-3.7.1p2.orig/auth.c Tue Sep 2 23:32:46 2003
+++ openssh-3.7.1p2/auth.c Tue Oct 7 10:58:33 2003
@@ -300,8 +300,17 @@
#ifdef CUSTOM_FAILED_LOGIN
if (authenticated == 0 && strcmp(method, "password") == 0)
+ {
+#if #system(bs2000...
2008 May 22
1
disaggregate frequency table into flat file
i appologise for the trivialness of this post - but i've been searching the
forum wothout luck - probably simply because it's late and my brain is
starting to go..
i have a frequency table as a matrix:
orig<-matrix(c(40,5,30,25), c(2,2))
orig
[,1] [,2]
[1,] 40 30
[2,] 5 25
i basically need a random sample say 10 from 100:
[,1] [,2]
[1,] 5 2
[2,] 0 3
i got as far as
orig<-as.data.frame.table(orig)
orig
Var1 Var2 Freq
1 A A 10
2 B A 5
3 A B...
2011 Apr 29
4
You don't check for malloc failure
Hi,
You don't check for malloc failure. I've made a patch that is possibly
wrong but it saves the program from SIGSEGV and replaces it with SIGABRT.
-peter
diff -ru icecast-2.3.2-ORIG/src/admin.c icecast-2.3.2/src/admin.c
--- icecast-2.3.2-ORIG/src/admin.c Fri May 2 17:40:00 2008
+++ icecast-2.3.2/src/admin.c Thu Apr 28 19:53:03 2011
@@ -291,6 +291,9 @@
fullpath_xslt_template_len = strlen (config->adminroot_dir) +
strlen (xslt_template) + 2;
f...