Displaying 20 results from an estimated 100 matches similar to: "Comprobar los nombres de columnas entre varios dataframes"
2019 Oct 25
2
Duda de como contar casos por Programa.
Hola,
Tengo un tabla de datos con pacientes asistidos, para los cuáles tengo
variables como dni, género, programa de atención etc. Hay pacientes que
atendieron en más de un programa por lo cuál se repiten en la tabla. Lo que
quiero es poder contar con una matriz que me permita identificar la
cantidad de pacientes que coinciden entre programas.
Va un ejemplo:
[image: image.png]
Intenté de
2012 Jun 28
4
Printing a variable in a loop
Dear R Users:
I'm a STATA user converting to R, and I'd like to be to do the following.
#Assign var_1 and var_2 a value
10->var1
20->var2
#Now I'd like to print the values of var_1 and var_2 by looping through
var_1 and var_2 in such a manner:
while(y<3){
print(var_y)
y+1->y
}
In STATA, the "y" appended to " var_" is called the local variable and
2010 May 20
2
multiple 2 by 2 crosstabulations?
Hello,
I have a dataframe (var_1, var_2, ..., var_n) and I would like to export summary statistics to Latex in the form of a table. I want specific summary statistics by crossing numerous variables 2x2 AT ONCE. In each cell I would like sometimes to have the median (Q1 - Q3), or frequency and proportion, etc. CrossTable, xtab, etc... do not allow for multiple 2 by 2 crosstabulation. The table
2008 Apr 15
1
glm syntax question
Hello,
I'm new to R and have a very basic syntax question for the
functionglm. I am using the function glm() to do a regression on a
data set. I want to run this function in a while loop, so I need to be
able to do two things:
(1) I need to be able to have my list of variables in the regression
be based from a variable vector instead of hard code.
(2) I need to be able to collect the
2006 Sep 21
2
delete a entire vector of a dataframe
delete a entire vector of a dataframe
Hello,
i want to delete a vector and tried "rm (t.d$V712)". This did not work,
message was, could not find variable. I thought the $ defines the vectro
in a dataframe, when I just type "t.d$V712" the content of this vector
is displayed.
Greetings, Thomas
2011 Jan 20
2
Accessing a 'user' variable via. dialplan.
Hi,
I know you can access various sip variables via
'Set(sstatus=${SIPPEER(201,status)})' (for example) to get the status of
the sip user - but what about variables?
I have a user that has setvar=123456 in their users.conf (sip.conf if
you prefer). I can read it with a 'sip show peer 201' - but that gives
everything and parsing that isn't really an option.
Anyone know how
2013 May 15
4
series financieras
Buenos dias,
Tengo la siguiente duda.
Desde una hoja de calculo .xls me descargo un fichero en r as.matrix.
Time VAR_2 VAR_3 VAR_4........ VAR_N
Fechas(n) Precios Precios Precios Precios
Fechas (n-1)
¿como puedo hacer para graficar de forma ordenada (fechas) cada uno del vector columnas (son precios de activos)?
[[alternative HTML
2015 Jul 13
2
Crear datos aleatorios con restriciones
Hola,
Esta pregunta la hice en stackoverflow
<http://stackoverflow.com/questions/31137940/randomly-assign-teachers-to-classrooms-imposing-restrictions/31143808#31143808>pero
nadie pudo contestarla.
1. Quiero generar N escuelas, con G grados y C divisiones.
2. Quiero asignar cada uno de T maestros a 2 divisiones en un grado y
escuela
Si tengo C=4 divisiones, puedo lograr lo que quiero con
2016 Jul 05
3
ayuda frecuencia asistencia clase
Estimados usurios-R:
Tengo una lista de alumnos.
Hay alguna forma de sacar una tabla de frecuencias por la asistencia a
clases mensual.
Es decir cuantos días concurrió cada alumno en el mes.
Supongamos que la lista está conformada por ocho alumnos, el curso duró 4
días y quiero saber cuantos días concurrió cada uno al curso poniendolo en
la columna mes.
Quisiera obtener un cuadro así:
Alumnos
2015 Jul 13
2
Crear datos aleatorios con restriciones
Hola,
0. La falta de 'elegancia' hace que sea mas dificil hacer cambios al
codigo. Por ejemplo cambiar n.classrooms <- 4 a n.classrooms <- 20
1. Cuando tengo solo 4 puedo hacer esto:
schoolGrade$A <- Teachers$Teacher.ID[1:cuttoff1]
schoolGrade$B <- Teachers$Teacher.ID[1:cuttoff1]
schoolGrade$C <- Teachers$Teacher.ID[(cuttoff1+1):n.teachers]
schoolGrade$D <-
2011 Mar 04
2
Creating a .png with just an expression() in it
Hey,
I'm trying to create an image file with the results of a regression
analysis. In TeX, the line would be something like:
$ size = 0.34 + 4.3 var_1 $
Can I create a plot window with just this line in it? I tried playing
around with plot.new() or dev.new(), but didn't really find something
that worked.
Thanks in advance,
Alex
--
alexx at alexx-fett:~$ vi .emacs
2005 Mar 29
6
Aggregating data (with more than one function)
I have the data similar to the following in a data frame:
LastName Department Salary
1 Johnson IT 56000
2 James HR 54223
3 Howe Finance 80000
4 Jones Finance 82000
5 Norwood IT 67000
6 Benson Sales 76000
7 Smith Sales 65778
8 Baker HR 56778
9 Dempsey HR 78999
10 Nolan
2015 Jul 13
2
Crear datos aleatorios con restriciones
Perdon por no se lo suficientemente claro :(
Tu codigo produce `validPairs` que tiene 7 variables y 360 observaciones.
Donde
> validPairs[1,] V1 V2 V3 V4 V5 V6 valid
60 e1 g1 c1 e1 g1 c2 Valid
indica que un maestro tiene asignado c1 y c2 en la escuela e1 y el grado
g1. Correcto? Si es asi, esto es casi lo que queira producir y creo que
puedo llegar a donde quiero usando tu codigo de base.
2015 Jul 13
2
Crear datos aleatorios con restriciones
Gracias Carlos,
Tu codigo es un gran paso en el sentido correcto pero no produce
exactamente lo que estoy buscando.
Mi "solucion" en stackoverflow
<http://stackoverflow.com/questions/31137940/randomly-assign-teachers-to-classrooms-imposing-restrictions/31143808#31143808>
produce un data frame `schoolGrade` con 240 observaciones y 7 variables. Mi
objetivo es poder generar un data
2015 Jul 28
2
función cantidad mayor de valores
Hola Javier,
Intenta los siguientes cambios
g4 <- function(codigo_llega, n_caracteres){
codigo_llega <- as.character(codigo_llega)
if(n_caracteres == 6) res <- substr(codigo_llega, start=0, stop=4)
else res <- codigo_llega
res
}
g4 <- Vectorize(g4)
x <- c('Jorge Velez','Javier Marcuzzi','Daniel Merino','Susana deus
Alvarez', 'Carlos
2007 Nov 06
1
Algorithms for coincidences
I'm looking at algorithms for determining coincidences. In educational
testing, it is interesting to look at cheating via the birthday problem
where I can assess the probability of n students having the same test
score in a class of size k.
I was writing my own code for the b-day problem until I ran into the
qbirthday() function, which has solutions for the overflow problems I
kept running
2008 Jul 30
2
Eclipse/Statet: How to set breakpoints
Hi,
I'm using the IDE Eclipse with the Statet-Plugin to develop R-code.
Is there a possibility to set breakpoints for debugging in R-script files
(just like in Java-code)?
Cheers,
Eli
2001 Jun 08
1
binom.test appropriate?
Hi there,
as part of a 2 x 2 contingency table analysis I would like to estimate
conditional probabilities (success rates) in a Bernoulli
experiment. In particular I want to test a null hypothesis p <= p0
versus the alternative hypothesis p > p0.
As far as I understand the subject, there are UMPU tests for these
types of hypotheses.
Now I know about R's "binom.test" but the
2006 Jan 23
1
proposed pbirthday fix
Recent news articles concerning an article from The Lancet with fabricated
data indicate
that in the sample containing some 900 or so patients, more than 200 had
the same
birthday. I was curious and tried out the p and q birthday functions but
pbirthday
could not handle 250 coincidences with n = 1000. The calculation of upper
prior
to using uniroot produces NaN,
upper<-min(n^k/(c^(k-1)),1)
2004 May 24
2
High CPU utilization
Apparently nobody has a suggestion to why smbd process all of a sudden starts
sucking CPU like crazy? Restarted samba and then restarting the entire server
does not fix it. Searching the archives shows I'm not the only one with this
problem. The archives do not show what to do about it yet. Grr...
Redhat 9.0
Samba 3.04 ( I have 2.2.7 servers that have done this to me also)
- Gary