similar to: Matrix of Elements of Different Types (was Interfacing pre-existing C++ library from R)

Displaying 20 results from an estimated 9000 matches similar to: "Matrix of Elements of Different Types (was Interfacing pre-existing C++ library from R)"

2002 Feb 18
3
i think i asked the wrong ?
me again, new to R, haven't programmed in a long time at all sorry to ask what is probably basic a while ago i asked how to remove an element from a list apparently what i am using is not a list but a vector, didn't realize there was a list data type could also use a matrix for what i am doing, is there a way to remove single elements from either of those? thanks for any help, if i was
2018 Jul 03
2
"Desarmar" una lista de matrices
Buenas tardes (o día, lo que les toque) Gracias a la ayuda de la lista conseguí seguir adelante, y debido a mi desconocimiento, no puedo seguir haciendolo. Nuevamente pido ayuda. Tengo una lista generada con lapply, algo así milista <- lapply(as.list(cars[,1:2]), dist) La lista es un poco diferente, genera unos cientos de matrices. ¿Cómo puedo hacer para que me separe automáticamente cada
2012 Feb 27
4
Duda lapply
Hola a todos/as: Tengo la siguiente duda: Construyo una lista de tamaño 2, del siguiente modo: miLista<-list() miLista[[1]]<-list(nombre="Ana", apellido1="Pérez", apellido2="Sánchez") miLista[[2]]<-list(nombre="Carlos", apellido1="Núñez", apellido2="Sierra") Le aplico la función turnoLaboratorio: miResul<-lapply(miLista,
2010 Apr 21
2
suggestion how to use memcpy in duplicate.c
>From copyVector in duplicate.c : void copyVector(SEXP s, SEXP t) { int i, ns, nt; nt = LENGTH(t); ns = LENGTH(s); switch (TYPEOF(s)) { ... case INTSXP: for (i = 0; i < ns; i++) INTEGER(s)[i] = INTEGER(t)[i % nt]; break; ... could that be replaced with : case INTSXP: for (i=0; i<ns/nt; i++) memcpy((char *)DATAPTR(s)+i*nt*sizeof(int),
2011 May 05
2
Compiling a FORTRAN program under Windows 7
Hi, I am trying to compile a FORTRAN program to call from R under Windows 7 but I am having problem in the compiling step. To demonstrate this is the program testit.f: ------------------------------------------ subroutine TESTIT(x,n,m) dimension x(n) do 10 i=1,n 10 x(i)=x(i)**m end -------------------------------------------- When I compile it with gfortran I get
2015 Oct 28
3
Extraer elementos diagonales de submatrices
Estimado Javier, Gracias por tu mensaje. No, lo unico que requiero es la lista de números (i1, 2, 3, 1, 2, 3, 4, 5, 1, 2). Saludos cordiales, Jorge.- 2015-10-28 14:35 GMT-05:00 Javier Rubén Marcuzzi < javier.ruben.marcuzzi en gmail.com>: > Estimado Jorge I Velez > > > > No comprendo un punto, dices que deseas construir sub matrices y extraer > elementos de sub
1999 Jul 16
7
R:how to separate stuff?
Thanks for your help on moving files from S+ to R and on attaching directories. If attaching directories is NOT possible in R, is there any other way to separate objects into different folders or something similar? For example, to keep user functions for multivariate analysis in a different "place" than user functions on time series, or to keep data objects of project_1 in a different
1999 Jul 16
7
R:how to separate stuff?
Thanks for your help on moving files from S+ to R and on attaching directories. If attaching directories is NOT possible in R, is there any other way to separate objects into different folders or something similar? For example, to keep user functions for multivariate analysis in a different "place" than user functions on time series, or to keep data objects of project_1 in a different
2011 Jun 03
4
¿como saber que viene en un list?
Hola, he estado buscando por todos lados, como puedo saber que traigo en un una variable que es un list, y pues nomas no encuentro nada. alguien sabe alguna función como dim, en caso de los data.frame que nos da las dimensiones, o length en un vector que nos da cuantos elementos tiene algo como names para saber el nombre de los objetos dentro del list, en esencia me gustaría saber si alguien
2013 Aug 25
3
Rodondeo de una matriz
Gracias, Jorge. Y cual fue la solucion a la que llegaron? --JIV Sent from my phone. Please excuse my brevity and misspelling. On Aug 25, 2013, at 8:36 AM, Jorge Ayuso Rejas <jayusor@gmail.com> wrote: Esto lo hice yo en una práctica en la universidad, Definíamos un problema de optimización entera minimizando el error de redondeo y restringiendo a la suma de filas y columnas. El 23 de
2014 Jun 13
2
Crear matriz binaria
Hola, no encuentro el momento en el que se relacionan los inventores, es decir, lo que relaciona a dos o más inventores es la patente. Primero, ¿cómo debo ordenar los datos? Tengo 1813 número de patentes, es decir, la matriz es de dimension 1813 x 1813. Tengo varios órdenes en los datos, por ejemplo, el primer arreglo es por patente, en las columnas tengo ?no. de patente?, ?inventor 1?,
2014 Jun 13
2
Crear matriz binaria
Hola, Estoy tratando de crear una matriz cuadrada, binaria y no tengo idea por dónde comenzar. Los datos que tengo son patentes e inventores por patente, las patentes las identifico por su código y a los inventores por nombre y también los tengo codificados. Deseo hacer una matriz de nxn en donde los renglones son inventores de la A a la Z y columnas son los mismos inventores de la A a la Z,
2013 Aug 23
2
Rodondeo de una matriz
Buenas tardes a tod@s, Me gustaria redondear las entradas de una matriz m manteniendo la suma de filas y columnas constantes (son valores fijos conocidos). En la aplicacion que estoy trabajando (en la que por supuesto m tiene una dimension mayor que en el ejemplo), no son permitidos numeros decimales y por ello debe efectuarse el redondeo. La forma de m es: m <- matrix(c(3.546, 4.5345,
2015 Mar 09
2
Calculos matrices diferentes tamaños
Buen Día Jorge, Es algo parecido a lo que necesito, pero no debo tener en cuenta la suma de la columna sino por ejemplo: Tengo el elemento [1,2] en la matriz A que contiene el número 5 y por otra parte tengo la columna [,2] de la Matriz B con valores por ejemplo (1,2,3,4,5,6,7,8,9,10,11,12). El resultado debería ser un vector que en la posición uno debe indicar que existen 7 valores mayores a 5
2013 Oct 28
1
Lazos (bucles) anidados
Estimados me pueden ayudar con el siguiente problema, necesito reducir lineas de programación mediante un bucle, las instrucciones que estoy realizando son: matriz_lambda<-matrix(NA,32,19) m_lambda_b<-matrix(NA,32,19) for(i in 1:32){ if(i<32){ matriz_lambda[i,1]<-sum(matriz5[i,c((i+1):32)]) matriz_lambda[i,2]<-sum(matriz6[i,c((i+1):32)])
2016 Feb 11
4
Invertir dcast
Con data.table todo puede ir muy rapido. > require(data.table) > M=matrix(c(5,NA,NA,NA,6,NA,7,NA,8),3,3) > M [,1] [,2] [,3] [1,] 5 NA 7 [2,] NA 6 NA [3,] NA NA 8 > M2=data.table(M) > M2 V1 V2 V3 1: 5 NA 7 2: NA 6 NA 3: NA NA 8 > M3=melt(M2,variable.name = "columna") > M3 columna value 1: V1 5 2: V1 NA 3: V1
2006 Feb 23
3
Polycom IP601 Question
Hey everyone, I haven't seen an issue quite like mine, so I am hoping anyone who used the Polycom 601's may have an idea. We are going to be switching our office over to Asterisk. All the phones are going to be 601's, I am going to set up a boot server, but for now I am just going to test everything on one phone. My question is I have the phone registered in Asterisk (phone icon
2015 Oct 28
2
Extraer elementos diagonales de submatrices
Buenos dias a todos, Quisiera extraer algunas entradas de una matrix "m" teniendo en cuenta algunas restricciones. El siguiente ejemplo ilustra la situacion: ## input m <- structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5), .Dim = c(10L, 5L)) m ## output output <-
2017 Jan 19
2
Error en loop anidado con data.table
Hola tengo una tabla de tipo data.frame "datos" con la siguiente estructura, simplificada en número de niveles por variable, para crear un ejemplo más sencillo: id anio t_8a t_10a t_12a rankf8 rankf10 rankf12 1 1 100 220 220 NA NA NA 2 1 140 350 350 NA NA NA 3 2 55 165 165 NA NA NA 4 2 60 200 200 NA NA NA 5 2 100 NA NA NA NA NA 6 3 NA 350 350 NA NA NA También tengo una matriz,
2001 Apr 23
1
several bugs (PR#918)
# Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@r-project.org # ###################################################### 1. as.numeric behaves differently in R than in S and I think this shows a bug in how S3