Displaying 20 results from an estimated 300 matches similar to: "Merge problem"
2011 Mar 30
6
Quick recode of -999 to NA in R
Hi,
I am trying to write a loop to recode my data from -999 to NA in R. What's
the most efficient way to do this? Below is what I'm presently doing, which
is inefficient. Thanks,
Chris
dat0 <- read.table("time1.dat")
colnames(dat0) <- c("e1dq", "e1arcp", "e1dev", "s1prcp", "s1nrcp", "s1ints",
2006 Oct 18
1
MARS help?
I'm trying to use mars{mda} to model functions that look fairly
close to a sequence of straight line segments. Unfortunately, 'mars'
seems to totally miss the obvious places for the knots in the apparent
first order spline model, and I wonder if someone can suggest a better
way to do this. The following example consists of a slight downward
trend followed by a jump up after
2012 Dec 24
1
How to do it through 1 step?
A data set(dat),has 2 variables: x and a, and 100 rows.
I wanna add 2 variables,and call the new data set dat1:
var1:f = a/median(a)
var2:x_new = x*f
My solution:
dat1<-transform(dat,f = a/median(a),x_new = x*f)
But gets error reply which says that "f" is not exits since dat has no variables called "f".
So I have to do through 2 steps:
2011 Jun 23
2
Merging multiple data sets
Hi,
I am trying to merge data similar to the example data below
> dat0
id var1 var2 var3
2 1 0 1
3 1 0 1
4 0 1 1
5 0 1 1
> dat1
id var4 var5 var6
2 1 0 1
3 1 0 1
6 0 1 1
7 0 1 1
> dat2
id
2012 Feb 29
2
How to replace the values in a column
Dear All,
I've been searching relevant topics about replacing values, none seemed to
be applicable to me...
I have a file with many many varieties, and want to replace some of them
into different names.
I tried various of ways, still don't know how to do that most efficiently..
Here is part of the example data:
Gen Rep
A_1 1
A_1 2
A_2 1
A_2 2
B_1 1
B_1
2006 May 09
4
changing the color of :highlight
Is there an easy way to change to color of the :highlight effect?
:complete => visual_effect(:highlight, "targetid", :duration => 1)
thanks
--
Posted via http://www.ruby-forum.com/.
2013 Feb 23
5
Selecting First Incidence from Longitudinal Data
I have a longitudinal competing risk data of the form:
ID COMPL SEX HEREDITY
1 0 1 2
1 0 1 2
1 3 1 2
2 0 0 1
2 1 0 1
2 2 0 1
2 2 0 1
3 0 0 1
3 0 0 1
3 0 0 1
3 0 0 1
3 2 0 1
4 0 1 2
4 0 1
2010 Oct 01
1
add a new column to data frame
Hi, I am wondering if anyone can propose a simple/best way to do the following:
Let's say I have a data frame
dat <-
cbind(expand.grid(mode=c('right','left'),time=0:3,id=c('p1','p2','p3')),y=c(3,5,rep(4,6),6,2,rep(3,6),4,4,rep(2,6)))
dat
mode time id y
1 right 0 p1 3
2 left 0 p1 5
3 right 1 p1 4
4 left 1 p1 4
5 right 2
2002 Feb 20
3
Pointer to covariates?
In the first line, use the dist function, found in library mva,
to get the distance between each pair of rows. From this
calculate an incidence matrix for which element i,j is true if
row i in dat equals row j in dat (and false elsewhere).
In the second line, for each row calculate the indices of
the matching rows and take the minimum of those as the key.
incid <-
2010 Dec 06
7
[PATCH 1/8] staging: hv: Convert camel case struct fields in vstorage.h to lowercase
From: Hank Janssen <hjanssen at microsoft.com>
Convert camel case struct fields in vstorage.h to lowercase
Signed-off-by: Abhishek Kane <v-abkane at microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
Signed-off-by: Hank Janssen <hjanssen at microsoft.com>
---
drivers/staging/hv/storvsc.c | 133 +++++++++++++++++++++--------------------
2010 Dec 06
7
[PATCH 1/8] staging: hv: Convert camel case struct fields in vstorage.h to lowercase
From: Hank Janssen <hjanssen at microsoft.com>
Convert camel case struct fields in vstorage.h to lowercase
Signed-off-by: Abhishek Kane <v-abkane at microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
Signed-off-by: Hank Janssen <hjanssen at microsoft.com>
---
drivers/staging/hv/storvsc.c | 133 +++++++++++++++++++++--------------------
2003 Feb 27
1
NA in dummy regression coefficients
Hi
I'm doing a regression analysis with dummy variables and I'm getting NA
for some coefficients. I've inspected residuals, leverage effects and
Cook's distance and it seems ok.
Can someone explains what can cause this problem ?
Thanks
EJ
2008 Apr 28
8
NetApp vfiler example scripts
Hi,
For anyone who is interested; I created some basic scripts based on my
current iSCSI block script.
http://kinkrsoftware.nl/contrib/xen/block-netapp
http://kinkrsoftware.nl/contrib/xen/netapp-lun.py
Basically these two scripts allow you to start a vfiler with a qtree of
customers. You log in the NetApp upon boot, and can use:
netapp://customer1/disk1
It is work in progress... because I
2008 Apr 28
8
NetApp vfiler example scripts
Hi,
For anyone who is interested; I created some basic scripts based on my
current iSCSI block script.
http://kinkrsoftware.nl/contrib/xen/block-netapp
http://kinkrsoftware.nl/contrib/xen/netapp-lun.py
Basically these two scripts allow you to start a vfiler with a qtree of
customers. You log in the NetApp upon boot, and can use:
netapp://customer1/disk1
It is work in progress... because I
2006 Aug 23
0
Random structure of nested design in lme
Why are the results not reliable?
________________________________
From: ESCHEN Rene [mailto:rene.eschen@unifr.ch]
Sent: Wednesday, August 23, 2006 3:48 AM
To: Spencer Graves; r-help@stat.math.ethz.ch
Cc: Doran, Harold
Subject: RE: [R] Random structure of nested design in lme
The output of the suggested lmer model looks very similar to the output of aov, also when I ran the model
2016 Oct 28
2
Encontrar la primera columna no NA
Hola a todos, me ha gustado mucho la solución de Carlos, muy eficiente y
muy ingeniosa al utilizar la funcion col() que o no la conocia o no me
acordaba de ella.
La parte mas "lenta" sigue siendo el apply que en el fondo no es mas que un
ciclo for a traves de las filas, asi que inspirado por el metodo de Carlos
pense que podria ser mas rapido si iteramos a traves de las columnas por lo
2006 Oct 30
1
Cannot be coerced to logical?
Hello all,
So I am having a puzzling problem. I am working with a 534 x 1065
data frame entitled LocalMaxExpBlue.COR which is completely full of
logical values "TRUE" and "FALSE." However, when I attempt to
manipulate this data frame, R does not recognize it as logical.
Strangely enough, it will identify individual columns (but not rows)
as logical. It will also
2016 Oct 27
4
Encontrar la primera columna no NA
Por último, utilizando la indexación lineal de matriz que propusó luisfo en su momento:
> t <- Sys.time()
> M=as.matrix(dat)
> index <- which(!is.na(M)) - 1
> meses<-colnames(M)
> M2<- data.table(columna=index %/% nrow(M) +1L, jugador=index %% nrow(M) +1L , valor=M[index+1L])
> setkey(M2,jugador,columna)
>
2024 Sep 11
4
[Bug 3733] New: "forced command options do not match" after key error
https://bugzilla.mindrot.org/show_bug.cgi?id=3733
Bug ID: 3733
Summary: "forced command options do not match" after key error
Product: Portable OpenSSH
Version: 9.8p1
Hardware: amd64
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: sshd
Assignee:
2016 Oct 27
2
Encontrar la primera columna no NA
Otra solución algo más rapida:
> t <- Sys.time()
> dat[,jugador:=1:.N]
> dat2=melt(dat,id.vars="jugador")
> setkey(dat2,jugador)
> dat2[,index:=min(which(!is.na(value))),by=jugador]
> dat2[,.(First_month=variable[index[1]],Value_First_month=value[index[1]]),by=jugador]
jugador First_month Value_First_month
1: 1 Uno 0.93520715
2: