Displaying 20 results from an estimated 80 matches similar to: "Formula in a data-frame"
2013 Jan 16
1
Mean calculation by two variables
Hello All,
I have a data frame (dput information below) with food item weight for fish
species.
I need to calculate the Mean proportion by weight of each food item for
each specie, as show in solution data frame (dput information below).
I use the ddply function (plyr package) in two steps. First calculate the
proportion of weight for each individual:
step1 = ddply (example, .(ID), transform,
2007 May 08
2
Limit + Conditions = Confusion
Hi,
Could you please explain the :limit to me? I thought I knew what it was
but now it seems I''ve misunderstood something.
>> Fooditem.find_by_contents("*quark*", {:limit => 10}, {:conditions => ["origin = ?", "fda"]}).length
=> 1
>> Fooditem.find_by_contents("*quark*", {:limit => 2000000}, {:conditions => ["origin
2006 Aug 17
6
Rails and Checkboxes
Hi
I''m having a really hard time trying to get a specific form in RoR to
work. I''m trying to build a really simple page which lets the user make
a pizza by setting check boxes. The choose their toppings, click submit
and the form does a callback and shows them how much it will cost to
have a pizza with those toppings on.
At the moment I have the following:
View:
<%=
1999 May 28
0
password server problems and permission inheritance
Hello,
I am attempting to replace an NT server with Samba (2.0.4) under
Linux (2.2.9) here at Plattsburgh State, and have 2 questions about a
couple of snags I've run into:
1) Is there any way to specify a password server that has a space in its
name? I keep getting errors in the log saying "Cannot find server
WINDOWS" and "Cannot find server SERVER" (our NT server has
1999 Jul 19
0
Non-executable share
Hey,
Does anyone out there know an easy way to make a Samba share not
allow programs to run from it? Is there a way, besides simply hiding
.exe files? I know this can be enabled on NTFS partitions under NT
(bleech), but it would be nice to stop people from running programs out of
publicly writable directories. I'm aware of why the linux ext2 execute
permissions don't handle this btw...
2012 Sep 25
2
Strange data frame behavior
Hello all,
I don't understand a strange behavior in data frame manipulation.
data_frame1 = data.frame(Site = c("S1", "S2", "S3", "S4", "L1", "L2",
"L3", "L4"),
Number = c(1, 3, 5, 2, 1, 1, 2, 1))
data_frame2 = data_frame1 [data_frame1$Site != "S1", ]
dput (data_frame2)
structure(list(Site =
2019 Mar 12
2
Reordenar una matriz con caracteres en cada celda
Hola,
tengo una matriz de especies donde cada celda tiene datos con caracteres
(son parentesis). Cómo la puedo reordenar considerando tanto filas como
columnas?
Ejemplo:
,Specie 1, Specie2, Specie3
Specie1, NA, 3(1-4), 8(6-9)
Specie2, 5(2-6),NA, 5(4-6)
Specie3, 2(1-3), 10(5-15), NA
Quiero:
,Specie 2, Specie3, Specie1
Specie2, NA, 5(4-6) , 5(2-6)
Specie3, 10(5-15) ,NA,
2003 Apr 09
1
[OFF] Nested or not nested, this is the question.
Hi,
sorry by this off.
I'm still try to understand nested design.
I have the follow example (fiction):
I have 12 plots in 4 sizes in 3 replicates (4*3 = 12)
In each plot I put 2 species (A and B) to reproduce.
After a period I make samples in each board and count the number of
individuals total (tot) and individuals A and B (nsp). Others individuals
excepts A and B are in total of
2011 Mar 14
4
Serial Date
Hello R Help,
I'm working in a project with a software that register date and time data in serial time format. This format is used by excel, for exemple. In this format, 40597.3911423958 is 2011/2/23 09:23:15. First part is number os days since 1900/1/1, and second part is a fraction of a day.
I need to make this transformation in R, and use it to make some algebrian operations. I found that
2013 Oct 15
2
Data handling
Hello all,
I'm having a problem with data handling. My input data is (dput in the
after the signature):
Date Time Fraction
06/19/13 22:15:39 0.3205
06/19/13 22:15:44 0.3205
06/19/13 22:15:49 0.3205
06/19/13 22:15:54 0.3205
06/19/13 22:15:59 0.3205
06/19/13 22:16:09 0.3205
Date in format month/day/year, Time in HH:MM:SS and fraction represents the
fractions of
2013 Jan 04
3
help "reshaping" dataframe
List,
I want to reshape my data, but I'm not sure how to do it... it might be a
simple task, but don't know which package does this.
"occ.data" (see below) is how my original data are arranged, and I know
that with melt() I can reshape it like "y" (see below). However, I just
want to build a matrix like the "y" matrix, but with only 2 dimensions.
Something
2011 Apr 07
1
By function
Hello all!
I have a data frame with nine variables and 293 cases. (attached goes
the csv file).
I need to calculate a index using the sum of one variable (N) divided
by the length of other variable (Fisherman), but for each day (Date).
I tried to use that codes:
by (cpue, cpue$Date, function (x) sum (cpue$N)/length(cpue$Fisherman))
tapply (cpue$Data, cpue$Data, function (x) {sum
2012 Nov 23
2
Data frame manipulation
Hello,
I have a table that was constructed in a wrong way (dput data on bottom -
wrong data-frame):
Local Mês Dia Colonia X6h X7h X8h X9h X10h X11h
X12h X13h X14h X15h X16h X17h
1 Conceição Junho 1 3 2.16137 2.20412 2.08991 1.72428 1.69897
1.62325 1.44716 1.51851 1.43136 1.47712 1.51851 1.04139
2 Conceição Junho 2 3 2.46538 2.13672
2005 Mar 24
2
font sizes for row.names of dendograms
Dear R
I recently performed a cluster analysis. It produced the dendogram no
problem but unfortunately the font size of the row.names were all cluttered
due to their large size
So I tried to change the font size using
plclust(cluster.results, labels=iris$specie, cex=0.8)
and R came back to me saying
Error in plclust(cluster.results, labels = iris$specie, cex = 0.8) :
unused argument(s)
2010 Jun 09
4
question about "mean"
Hi there:
I have a question about generating mean value of a data.frame. Take
iris data for example, if I have a data.frame looking like the following:
---------------------
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4
0.2 setosa
2 4.9 3.0 1.4
0.2
2007 Jul 16
3
LSD, HSD,...
Hi,
I'm designing a experiment in order to compare the growing of
several clones of a tree specie. It will be a complete randomized block
design. How can I decide what model of mean comparision to choose? LSD,
HSD,TukeyHSD, Duncan,...? Thanks in advance
2011 May 08
2
Error in AnnotationDbi package - makeProbePackage
Dear all,
We have developed our own Affymetrix chip (Custom Express Array, PM-only
with two species).
I want to analyse the data with the limma package, but for that I need to
built my own CDF package,
probe package and built the filters to analyse one specie or another.
I'm using the makeProbePackage available in the AnnotationDbi (for a
R-2.13.0) but I got the following error message:
2005 Sep 19
4
indicator value in labdsv
Hi,
I'm trying to find out what threshold of indicator value in labadsv should be
used to accept a specie as an indicator one? So far I assumed that indval=0.5
is high enough to avoid any mistakes but it was based only in my intuition.
I'd be greatful for any advise
best regards
Agnieszka
2023 Jun 28
1
horizontal grouped stacked plots and removing space between bars
I have code like this:
data <- read.csv("test1.csv", stringsAsFactors=FALSE, header=TRUE)
# Graph
myplot=ggplot(data, aes(fill=condition, y=value, x=condition)) +
geom_bar(position="dodge", stat="identity", width=0.5) +
scale_fill_manual(values=c("#7b3294", "#c2a5cf", "#a6dba0", "#008837"))+
2011 Apr 21
1
numbers and superscripts in the same unit of measurement.
Hola everyone,
I'm doing an analisys about abundance of a planctonic specie in Robinson Crusoe Islan and I am having a hard time just adding the superscripts and the 100 (one hundred) in the measure of abundance.
Perhaps this is so basic to you, but I need to put the real unit of measure. Individuals / 100 cubic meters.
I have been looking in websites and R-list and there is not any