Displaying 20 results from an estimated 10000 matches similar to: "having problems re-ordering a dataframe"
2005 Jun 03
2
rearrange data
Dear all:
I have this:
A1 B1 C1 D1 E1
A2 B2 C2 D2 E2
A3 B3 C3 D3 E3
And I want this
A1 E1
B1 E1
C1 E1
D1 E1
A2 E2
B2 E2
C2 E2
D2 E2
A3 E3
B3 E3
C3 E3
D3 E3
Example:
m<- matrix(1:15,nrow=3,byrow=T)
m
v<- unlist(list(t(m[,1:4])))
u<- rep(c(5,10,15),c(4,4,4))
data.frame(v,u)
This is the result I want but I would like to learn a simpler way to do it.
Any clue?
2017 Aug 25
2
retrieve machine password in current Samba?
We have a wireless network that uses 802.1x authentication, in which domain joined computers use their machine credentials to connect.
Windows machines do this automatically, and until recently Linux computers could join using wicd, wpa-supplicant, and a simple script that would retrieve the machine password with tdbdump.
( specifically tdbdump -k SECRETS/MACHINE_PASSWORD/DOMAIN
2007 Mar 09
1
Applying some equations over all unique combinations of 4 variables
#I have a data set that looks like this. A bit more
complicated actually with
# three factor levels but these calculations need to
be done on one factor at a
#I then have a set of different rates that are applied
#to it.
#dataset
cata <- c( 1,1,6,1,1,2)
catb <- c( 1,2,3,4,5,6)
doga <- c(3,5,3,6,4, 0)
data1 <- data.frame(cata, catb, doga)
rm(cata,catb,doga)
data1
# start rates
#
2005 May 31
2
help
Dear all:
I have this:
A1 B1 C1 D1 E1
A2 B2 C2 D2 E2
A3 B3 C3 D3 E3
And I want this
A1 E1
B1 E1
C1 E1
D1 E1
A2 E2
B2 E2
C2 E2
D2 E2
A3 E3
B3 E3
C3 E3
D3 E3
Example:
m<- matrix(1:15,nrow=3,byrow=T)
m
v<- unlist(list(t(m[,1:4])))
u<-
2010 Jul 07
3
How do I test against a simple null that two regressions coefficients are equal?
Hi there,
I run two regressions:
y = a1 + b1 * x + e1
y = a2 + b2 * z + e2
I want to test against the null hypothesis: b1 = b2. How do I design the test?
I think I can add two equations together and divide both sides by 2:
y = 0.5*(a1+a2) + 0.5*b1 * x + 0.5*b2 * z + e3, where e3 = 0.5*(e1 + e2).
or just y = a3 + 0.5*b1 * x + 0.5*b2 * z + e3
If I run this new regression, I can test against
2004 Jul 08
2
Getting elements of a matrix by a vector of column indice s
See if the following helps:
> m <- outer(letters[1:5], 1:4, paste, sep="")
> m
[,1] [,2] [,3] [,4]
[1,] "a1" "a2" "a3" "a4"
[2,] "b1" "b2" "b3" "b4"
[3,] "c1" "c2" "c3" "c4"
[4,] "d1" "d2" "d3" "d4"
[5,]
2005 Jun 29
1
Failed "make check" under Fedora Core 4 (PR#7979)
I downloaded R v2.1.1 earlier this morning to compile under Fedora Core
4. It compiled without incident, but 'make check' failed. Below is the
relevant part of its report. Is this a known problem?
I used a locally compiled version of GCC v4.0.0 that reports
[kent at d89h102 R-2.1.1]$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.0/configure
2008 Feb 14
1
Small encoding question
Dear developeRs,
Compilation of the latest version (0.9-5) of my actuar package fails
with r-release MacOS_X ix86 on CRAN; see
http://www.R-project.org/nosvn/R.check/r-release-macosx-ix86/actuar-00check.html
All errors come from accented letters in comments in latin-1 encoded
files (except hierarc.R which is in UTF-8, my bad). Encoding is
declared as latin-1 in DESCRIPTION.
The package
2008 Dec 09
1
creating standard curves for ELISA analysis
Hello R guru's
I am a newbie to R, In my research work I usually generate a lot of ELISA
data in form of absorbance values. I ususally use Excel to calculate the
concentrations of unknown, but it is too tedious and manual especially when
I have 100's of files to process. I would appreciate some help in creating
a R script to do this with minimal manual input. s A1-G1 and A2-G2 are
2003 May 20
1
How to use pakcage SEM
Hi.
I have tried to use Package "SEM".
As a learning, I try to convert a program running well of EQS
which is as follows to SEM:
### EQS ###
/SPECIFICATION
CAS=100; VAR=5 MAT=COR; ANA=COR;
/EQUATIONS
V1=*F1+E1; V2=*F1+E2; V3=*F1+*F2+E3; V4=**F1+*F2*E4;
V5=*F2+E5;
/VAR
E1 TO E5=*; F1*1.0; F2=1.0;
/COV
E1,E2=*; F1,F2=*:
/PRINT
FIT ALL;
/MATRIX ......
/END
This is the converted SEM
2013 Nov 21
1
how can I import a number of datsets in a folder in my working directory to a list in R
Hi,
Suppose, if I create 15 files in my working directory.
set.seed(48)
lapply(1:15,function(i) {m1 <- matrix(sample(1:20,1686*2,replace=TRUE),nrow=1686,ncol=2); write.table(m1,paste0("file_",i,".txt"),row.names=FALSE,quote=FALSE)})
?D <-dir()
D1 <- D[order(as.numeric(gsub("\\D+","",D)))]
D1
?res <- t(sapply(D1,function(x) {x1<-
2003 Dec 15
2
3.0.1rc2 LDAP - problems joining domain
Hi,
I'm back on the list ;-)
I seem to be having some trouble getting W2K machines to join the domain in
3.0.1rc2. I haven't looked at this in detail since 2.2.8a but it looks like
the account gets created in LDAP and then it has trouble setting the password
appropriately. I believe this is the relevant part of the log:
api_rpcTNP: samr op 0x3a - api_rpcTNP: rpc command:
2005 Aug 13
1
How to change the names in tone pitch column
Hi,
I have a column (V4) in a midi event list which includes tone pitch names,
i.e. "A4, E4, C#4, A3...":
> compo[1:10,]
V1 V2 V3 V4 V5 V6 V7
1 1 1 0 A4 96 2 0
2 1 1 0 E4 96 2 0
3 1 1 0 C#4 96 2 0
4 1 1 0 A3 96 2 0
5 1 3 0 B4 96 1 0
6 1 3 0 E4 96 1 0
7 1 3 0 B3 96 1 0
8 1 3 0 G#3 96 1 0
9 1 4 0 C#5 96 1 0
10
2017 Nov 24
1
SSL configuration
Hello subscribers,
I have a very strange question regarding SSL setup on gluster storage.
I have create a common CA and sign certificate for my gluster nodes, placed host certificate, key and common CA certificate into /etc/ssl/,
create a file called secure-access into /var/lib/glusterd/
Then, I start glusterd on all nodes, system work fine, I see with peer status all of my nodes.
No problem.
2007 Aug 27
1
R 2.5.1 - Rscript through tee
Hi, people.
I met a little problem for which someone might have a solution. Let's
say I have an executable file (named "pp.R") with this contents:
#!/usr/bin/Rscript
options(echo=TRUE)
a <- 1
Sys.sleep(3)
a <- 2
If I execute "./pp.R" at the shell prompt, the output shows the timely
progress of the script as expected. If I use "./pp.R | tee
2009 Sep 01
2
ordering and factors into column headings
Hi,
The lab in which I send my samples return the results in a format that
is difficult for me to run my analysis. The lab outputs the results
where each parameter is its own row and it’s not consistently in the
same order (and not each sample is tested for the same suite of
variables).
e.g.
>dataset
site parameter value
a e2 3
a e1 1
a e3 5
b e3
2006 Feb 23
1
Tiny documentation error for ?options (PR#8633)
Hi, people. The output produced by "?options" contains:
'expressions': sets a limit on the number of nested expressions
that will be evaluated. Valid values are 25...500000 with
default 1000. [...]
and a bit further down:
The 'factory-fresh' default settings of some of these options are
[...]
'expressions'
2006 May 15
2
Truncated labels in hist (PR#8864)
Hi, people. Executing the following command:
hist(rpois(100,5), labels=TRUE)
yields a graphic in which some labels are truncated (on an X11 device).
The truncated labels are those over the highest bars. The hist function
should ideally manage enough room for the labels, automatically.
(Specifying ylim solves my problem, but yet, hist could be frienlier.)
--please do not edit the
2009 Nov 24
1
Encoding problems.
Hello,
I use:
R version 2.9.2 (2009-08-24)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
on Ubuntu 9.10, I usually run R from ESS (5.4 on current Unbuntu) from
Emacs-22.2.1. But I also tried the following from the console and it
gave the same results.
I have a data file containing lots of European characters, French,
German, Italian and so on. I can read it
2008 Apr 27
1
problem with size of array
+ > p2<-function(r){
+ gama=0
+ for(i in 1:1000){
+ c=caminho[[4]]
+ for(i in 1:caminho[[3]]+1) {
+ c=c+caminho[[i+3]]*((r[i])^(i-1))
+ d=(abs(c))*exp(-(x^2/2))}
+ gama=gama + ( d/(h(r[i])) ) }
+ return(gama)}
> e3<-p2(r)
OBS: r is a rnorm(1000,0,1)
> caminho
theta_chapeu f_estrela k a0 a1 a2 a3
1 3.2 1.2 3 2 1 4 5
>
question
i wanted gama to be