similar to: create a matrix with values from data.frame

Displaying 20 results from an estimated 1200 matches similar to: "create a matrix with values from data.frame"

2011 Mar 18
4
subset data frame with condition
Hello, One more question.. I have the data.frame "pop": xloc yloc gonad ind Ene W Area 1 23 20 516.74 1 0.02 20.21 1 2 23 20 1143.20 1 0.02 20.21 1 3 23 20 250.00 1 0.02 20.21 1 4 22 15 251.98 1 0.02 18.69 2 5 22 15 598.08 1 0.02 18.69 2 6 21 19 250.00 1 0.02 20.21 3 7 22 20 251.98 1
2011 Feb 25
1
data.frame operations
Hi All, I've been doing circles with this all morning, although I'm sure there's a simple solution. I have a data.frame "pop" as follows: > pop ind xloc yloc gonad 1 1 5 2 12 2 1 5 4 25 3 1 3 3 30 4 1 5 4 10 5 1 1 4 08 . . . . . 10 1 1 4 11 And I need the following steps: 1. Sum
2011 Feb 23
1
Fwd: Re: sum data from data.frame in a matrix
Hi Dennis, Thanks for your quick response and sorry for not being clear. That helped, but I need an actual matrix of e.g., 12 x 12 and those functions give me a matrix with only the "filled" locations. I need a 12 by 12 matrix with sums (0 if there's not data and the actual sum where there is) as follows: 1 2 3 4 5 6 7 8 9 10 11 12 1 0 0 0 . . . . . . 0 0 0 2 0 0 0 . 3 0
2011 Feb 23
1
sum data from data.frame in a matrix
Hi all (again), I have a data frame "pop": xloc yloc yield 1 10 12 95 2 11 10 81 3 12 11 20 4 12 11 10 And I want to get the sum of yield for the cell (pop$xloc, pop$yloc) in a matrix as follows: xloc 10 11 12 10 0 81 0 yloc 11 0 0 30 12 95 0 0 Any ideas? thanks! Nico
2011 Feb 08
2
delete a row in dataframe w/o changing indexing
Hi All, I'm trying to delete a row from my dataframe "pop" without changing the indexing (column 0) as follows: >pop id birth size xloc yloc weight energy gonad consumed 1 1 36 13 34 43 0 18 0 0 2 2 36 10 39 38 0 18 0 0 3 3 36 10 37 35 0 18 0 0 4 4 36 10 31 25 0
2011 Feb 27
2
substract 2 data.frames
Hi! I have 2 data.frames: "fish" and "popn": >fish xloc yloc id birth size weight energy gonad 20 15 15 54 -60 107.9 63.0 15952.9 8.0 21 15 15 32 -60 105.1 61.4 15538.8 7.8 91 4 43 96 -60 118.9 69.4 17573.2 8.8 71 32 4 64 -60 121.6 71.0 17976.0 9.0 34 2 64 20 -60 116.2 67.9 17173.0 8.6 95 6 20 58 -60 106.5
2011 Jan 26
1
return object from loop inside a function
Hi All, I have a for loop inside the function and I cannot get UUU to give me an updated grid.dens object when I run the function (it does update when I run just the for loop). Here's a simplified version of my function: UUU=function(pop, grid.dens) { for (i in 1:10){ Food=grid.dens[pop$yloc[i],pop$xloc[i]] #use initial grid.dens values Consumed=(pop$weight[i]*0.25) Left=Food-Consumed
2010 Sep 15
2
how to superimpose 2 matrices of different sizes
Hi All, I?m trying to superimpose (or "add") two matrices: 1. resulting from a table function with frequencies: > U=table(pop$xloc, pop$yloc)) 14 15 16 17 18 19 20 21 22 5 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 9 0 5 10 0 0 0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 0 0 2.
2010 Jan 20
1
function curve() (PR#14191)
Full_Name: Georgi Boshnakov Version: 2.10.1pat OS: Windows XP Submission from: (NULL) (130.88.123.205) When calling programmatically function curve() from package:graphics I experienced some trouble since it reports stop("'expr' must be a function or an expression containing 'x'") even if expr is "expression". Naturally, the user message uses
2011 Aug 17
1
Symbol Font Baseline, Cairo, Card Symbols
I think I found a bug in the Cairo library, plus weird behavior in both the Cairo and the normal pdf device. The baseline of the spades symbol seems to be off. This is easier to show than it is to explain. The problem does not appear in the normal pdf device, which is why I am guessing this is a Cairo bug. moreover, I cannot figure out why three of the card symbols seem to be transparent, but
2011 Feb 28
1
sub setting data.frame
Hi All, I have a data.frame: >pop consumed ind recruits gonad cell 1 516.74 1 0.02 20.21 0.25 2 1143.20 1 0.02 20.21 0.50 3 250.00 1 0.02 20.21 0.25 4 251.98 1 0.02 18.69 0.25 5 598.08 1 0.02 18.69 0.25 6 437.38 1 0.02 18.69 0.25 7 250.00 1 0.02 17.39 0.25 8 250.00 1 0.02 17.39 0.25 9
2012 Dec 11
2
lattice question: how to change the dot on boxplot to line
Hi, How does one change the dot for the median in a boxplot drawn using lattice? I have been looking at > names(trellis.par.get()) [1] "grid.pars" "fontsize" "background" [4] "panel.background" "clip" "add.line" [7] "add.text" "plot.polygon"
2003 Jul 03
1
SCSI backup error
Hi, Can someone please help me with this? I have just upgraded from 4.7 to 4.8-STABLE and this is what I am getting when I try a tape backup. Please CC as I am not in the list. It was working well before the upgrade (dump -0ua -f - / | gzip -c -9 | dd of=/dev/nsa0). Thank you, Lefteris Tsintjelis Jul 3 22:55:18 ene /kernel:
2005 Jan 18
2
auth samba+squid+ntlm
Hi. I need to use the ntlm_auth module to auth. users so a group can use Internet and other not, using squid. The users that belong to "Internet" group may use Internet. I've being looking for info. about this but there is no much info. in google. Until now this is the only info. that I had found: for squid.conf: auth_param ntlm program /usr/bin/ntlm_auth
2011 Jan 12
2
Problem after migration dovecot 1.2 -> dovecot 2.0
I have migrated from dovecot 1.2 to dovecot 2.0. When I connect via telnet to 110 port of the dovecot server the client hangs: telnet 192.168.4.80 110 Trying 192.168.4.80... /Connected to 192.168.4.80. Escape character is '^]'./ In syslog I got the following error: /Jan 12 12:14:44 buzon dovecot: imap-login: Error: auth: connect(login) in directory / failed: Permission denied
2013 Feb 11
2
how to make a median line thicker in bwplot (lattice)
Hello, I am drawing a boxplot using bwplot in lattice. I would like to learn how to draw a thicker median line instead of the default setting. Thank you. Code bwplot(........, pch=rep("|",2)) Elaine [[alternative HTML version deleted]]
2020 Sep 23
2
ORDEN GRÁFICO POR MESES
Hola, Estoy haciendo un gráfico con: ############################################################################# ## GRAFICO BARRAS : VALORES AL DEBE MENSUALIZADO ggplot(Diario_S2, aes(x=mes_AAA, by = MES , y=ARS_DEB))+ # ASIGNAR VARIABLES geom_bar(stat="identity", width=0.7, # ANCHO BARRAS colour="grey", fill="darkgreen", #
2020 Sep 22
3
EXTRAER MES EN LETRAS Y CASTELLANO
Buenas tardes, Estoy precisando generar una nueva variable que contenga el mes en tres letras, por ejemplo: ENE , FEB, MAR , ABR y así sucesivamente a partir de los valores que ahora tengo en el Dataset, que son 1, 2, 3, 4 y así sucesivamente. Entiendo que sería con mutate, pero consulto acerca del comando completo.. Gracias, Jesús _________________ *Jesús MARTÍN FRADE * Skype:
2006 Nov 29
2
filled.contour and NA's
Hi, I'm trying to do a filled.contour plot where some points are labelled as NA. How do I could plot this kind of graphics, so NA points are coloured black, keeping the levels of remaining points. NA's values represent land points (meaningless), and what I want to plot is the levels of a variable over the sea. x<-seq(length=21, from=-10, by=.25) y<-seq(length=8, from=36,
2020 Jan 24
2
Problema Fechas
Hola a todosestoy atascado con unas fechas, creo que en su día lo había solucionado pero no recuerdo cómo.Tengo un DF con un formato de fechas en tipo Factor He probado bastantes cosas para ponerlo en formato fecha tipo 11/01/2019 y siempre me da error. ¿Alguien puede echarme un cable? Gracias y saludos ------------ próxima parte ------------ Se ha borrado un adjunto en formato HTML... URL: