Hi R users,
I first categorized the continuous data into groups (ranges or category)
but now I would like to change the category into a continuous data and
plot it. For example I have attached the data in which you can see two
columns named "group" and "value". The group column contains a range
(gr
;
>
>
> Thanks
>
> Jim Holtman
> Data Munger Guru
>
> What is the problem that you are trying to solve?
> Tell me what you want to do, not how you want to do it.
>
> On Wed, Dec 22, 2021 at 10:23 PM Marna Wagley
> wrote:
> >
> > Hi R users,
>
Hi R users,
I was trying to estimate some values in r but could not figure out how to
write the script in r. Although I was able to estimate it correctly in the
excel. For example I have the following data set.
daT<-structure(list(sd = c(0.481, 0.682, 0.741, 0.394, 0.2, 0.655, 0.375),
mcd = c(51.3
FUN = boot_mean_se,
> >> statistic = bootprop, R = R)
> >> boot_year
> >> boot_year_area
> >>
> >> boot_year <- do.call(rbind, boot_year)
> >>
> >> d <- dimnames(boot_year_area)
> >> boot_year_area <-
Hi R users,
I was trying to extract the bootstrap mean and its SE by group but I have
been doing it by separating the group manually. The data set is big so
doing it manually is a kind of tedious task. I am wondering whether there
is a possibility to do it by creating a loop. I am weak in writing
ur code was usable but messed up... please set your email program to
> send plain text email so your formatting does not mess with your code.
>
>
> On August 10, 2021 10:30:57 PM PDT, Marna Wagley
> wrote:
> >Hi R Users,
> >I have two tables, one is temperature data (te
Hi R Users,
I have two tables, one is temperature data (temp) and another table is a
suitability index. I wanted to assign the suitability index value in the
temperature data (temp) based on Table 2 (or graph, which is a suitability
curve), but I could not figure it out.
Are there any suggestions f
Hi R Users,
I have been struggling to extract the data based on conditional values in
different columns. I have a very big dataset (rows) and a couple of
columns. here an example of the dataset is:
daT<-structure(list(ID = c("id1", "id2", "id3", "id4", "id5", "id6",
"id7"), First_detectiondate =
Dear R-Users,
I have a dataset containing more than two observation dates in some of the
columns and sites but I wanted to extract only the last date of the
observation.
Is there any easiest way to get that last observation in each column/row?
Here is the example data:
daT<-structure(list(ID = c(
ay. It will now return a matrix of indices with R
> = 1000 rows and 19 columns.
>
> Hope this helps,
>
> Rui Barradas
>
>
> Às 19:29 de 28/01/21, Marna Wagley escreveu:
> > Hi Rui,
> > I am sorry for asking you several questions.
> >
> > In the given e
aT)
bootprop <- function(data, index){
d <- data[index, ]
sum(d[["BothTimes"]], na.rm = TRUE)/sum(d[["Time1"]], na.rm = TRUE)
}
R <- 3
set.seed(2020)
b <- boot(daT, bootprop, R)
b
b$t0 # original
b$t
sd(b$t) # bootstrapped estimate of the SE of the samp
Yes Rui, I can see we don't need to divide by square root of sample size.
The example is great to understand it.
Thank you.
Marna
On Sat, Jan 23, 2021 at 12:28 AM Rui Barradas wrote:
> Hello,
>
> Inline.
>
> Às 07:47 de 23/01/21, Marna Wagley escreveu:
> > Dear Rui,
&
d(b$t) # bootstrapped estimate of the SE of the sample prop.
> hist(b$t, freq = FALSE)
>
>
> Hope this helps,
>
> Rui Barradas
>
> Às 21:57 de 22/01/21, Marna Wagley escreveu:
> > Hi All,
> > I was trying to estimate standard error (SE) for the proportion
Hi All,
I was trying to estimate standard error (SE) for the proportion value using
some kind of randomization process (bootstrapping or jackknifing) in R, but
I could not figure it out.
Is there any way to generate SE for the proportion?
The example of the data and the code I am using is attache
;y2"),
> aes(y = value*diff(rng) + rng[1])) +
>facet_wrap(~group) +
>scale_y_continuous(sec.axis = sec_axis(~ .*0.0001))
>
>
> Hope this helps,
>
> Rui Barradas
>
> Às 01:01 de 08/01/21, Marna Wagley escreveu:
> > Hi R users,
> > I wa
Hi R users,
I was trying to plot a graph with a secondary axis, and used the following
code for the data but the secondary line and secondary y -axis value did
not match. I would like to show both lines in one graph.
Any suggestions?
library(ggplot2)
library(reshape2)
daT<-structure(list(x = c(1L
/8/14",
"NULL"), class = "factor"), site5 = structure(c(3L, 3L, 3L,
1L, 3L, 2L), .Label = c("6/13/14", "6/25/13", "NULL"), class =
"factor"),
site7 = structure(c(2L, 1L, 3L, 3L, 3L, 3L), .Label = c("5/17/14",
&q
NULL NULL List,1
> id4 NULL List,1 NULL NULL
> id5 NULL NULL List,1 NULL
> id6 List,1 NULL NULL NULL
> id7 NULL NULL List,1 NULL
> > M <- with(daT, tapply(as.character(ObsDate), list(id, ObsSite), list,
> simplify=FALSE))
> > M[["id2", &quo
Hi R users,
I was trying to create a pivot table for the following data, in which I
wanted to put "id" in rows and "ObsSite" in columns and "Obsdate" is in
the cells.
I used the following code but it took only one date among the two dates.
For example, the animal (Id2) which was observed in the s
Hi R User,
I was trying to split a column by tabs, I tried to split with several ways,
but I could not split it. Is there any possibilities?
The data example and the code I used
daT1<-c("Column number 12345678
9 10 10 10 10 10 10 10",
"comes f
= year)) +
>theme_bw()
>
> Ab + facet_grid(year ~ .) +
>theme(axis.text.x = element_text(angle = 90,
> hjust = 1,
> size = 4))
>
>
> Hope this helps,
>
> Rui Barradas
>
> Às 21:37 de 04
Hi R Users,
I have been getting a trouble to create a time series plot (line) as I was
trying to create a line graph for each year using month and date (in x
axis). I would like to put only one x axis (month and date) for three years
using the facet_grid, but it has not been creating a lineplot for
ot;9-Mar-2015"), class =
> "factor")), .Names = c("ID",
> "site1", "site2"), class = "data.frame", row.names = c(NA, -18L
> ))
>
> daT1
> sapply(daT1, class) ## factors interfere with what you want.
>
> ## make ID "char
A, -18L
))
daT1$site1 <- as.Date(daT1$site1, format = "%d-%b-%Y")
daT1$site2 <- as.Date(daT1$site2, format = "%d-%b-%Y")
AA<-xtabs(~ site2 + site1, daT1)
AA
Once again, I am very grateful to you.
Thanks
On Fri, Jul 5, 2019 at 1:57 AM wrote:
> Hello,
&
Hi R users,
I was trying to create a pivot table (cross tabulated) by Site1date (rows)
and Site2 date (columns), and spent substantial time but no luck to create
it. Is there any possibility to create it?
I would be very grateful to your help.
"daT1" is row data, in which three columns (speciesID
Hi R User.
I have a date set in which I wanted to find the duration (period) between
released time and detection time for each individual. Is there any simplest
way to create a matrix?
I appreciate your help.
Thanks,
MW
--
Here is the example data,
dAT<-structure(list(Id = structure(
ow a "confidence interval" should be calculated, but
> that is another off topic discussion for which stats.stackexchange.com is
> a more appropriate venue.
>
> Cheers,
> Bert
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
Hi R User,
I was trying to calculate ratios with confidence interval using Monte Carlo
simulation but I could not figure it out.
Here is the example of my data (see below), I want to calculate ratios
(dat$v1/dat$v3 & dat$v2/dat$v3) and its confidence intervals using a 100
randomly selected data set
Thank you Jim, it worked. I am very grateful for your help.
Thanks
KG
On Tue, Sep 11, 2018 at 3:51 PM Jim Lemon wrote:
> Hi Kristi,
> My fault, I only worked out how to assign the values to the names and pick
> out the columns of daT for the calculations. I think this does what you
> want, but I
rvations. I think you may be mixing up case ID with location of
> observation.
>
> Jim
>
>
> On Wed, May 2, 2018 at 8:48 AM, Marna Wagley
> wrote:
> > Hi Jim,
> > Thank you very much for your suggestions. I used it but it gave me three
> > sites. But actually I d
9/9/16 9/15/17 A B
2 id_Y B1 9/7/16 9/15/16 A B
Thanks
On Tue, May 1, 2018 at 3:32 PM, Jim Lemon wrote:
> Hi Marna,
> Try this:
>
> library(prettyR)
> stretch_df(dat,idvar="ID",to.stretch=c("EventDate","
Hi R user,
I was trying to convert a long matrix to wide? I have an example and would
like to get a table (FinalData1):
FinalData1
B1B2
id_X "A" "B"
id_Y "A" "B"
but I got the following table using the following code.
FinalData1
B1 B2
id_X "A" "A"
id_Y "A" "B"
th
ame': 5 obs. of 3 variables:
> # $ Sites : Factor w/ 5 levels "Site1","Site2",..: 1 2 3 4 5
> # $ temp : num 14 15 12 12.5 17
> # $ precip: Factor w/ 4 levels "20","high","low",..: 2 3 4 1 1
>
> --------
Hi R user,
Would you mind to help me on how I can change a value in a specific column
and row in a big table? but the column of the table is a factor (not
numeric).
Here is an example. I want to change dat[4:5,3]<-"20" but it generated NA>
do you have any suggestions for me?
dat<-structure(list(Si
Hi R users,
I need to run a analysis using a data for each folder. I do have several
folders. Each folder contains several files but these files name are
similar to the files that is saved into another folders. I need to repeat
the analysis for every folder and would like to save the output in th
Hi R users,
I need to create more than 20 figures (one for each group) in one page. I
have a common legend for 20 figures using the facet_wrap. However the
range of the values among the groups are very wide. For example one group
has the value of 0 to 3, but the values of some of the groups has r
Hi R Users,
I do have very big data sets and wanted to run some of the analyses many
times with randomization (1000 times).
I have done the analysis using an example data but it need to be done with
randomized data (1000 times). I am doing manually for 1 times but
taking so much time, I wonder
College Station, TX 77843-4352
>
>
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of PIKAL Petr
> Sent: Wednesday, October 18, 2017 3:38 AM
> To: Marna Wagley ; r-help mailing list <
> r-help@r-project.org>
> Subject: Re: [R]
Hi R User,
I am new in R and trying to create tables with selecting rows randomly (but
with replacement) for each group but each group should have same number as
original. Is it possible to create it using the following example data set?
Your help is highly appreciated.
dat1<-structure(list(Regio
HI R user,
I was looking a r code and saw "%*%t", what does it("%*%t") mean?. The
example is given below.
For example: here is the code where "%*%t" has been used. when I run the
formula but did not run in my data.
prediction=plogis(as.matrix(mod7)%*%t(with(subset(data,site!='AB'),cbind(1,
site==
Hi R user,
I have created using metaNMDS (Nonmetirc Multidimensional Scaling, MDS) to
show species composition but some of the species are concentrated at some
of the sites so that the name of the species are overlaid and it was
almost impossible to read the species name in the figure. I was wonder
Hi R user,
I have samples with covariates for different classes, I wanted to choose
the samples of different groups with different probabilities. For example,
I have a 22 samples size with 3 classes,
groupA has 8 samples
groupB has 8 samples
groupC has 6 samples
I want to select a total 14 samples
Murdoch
>>
>>
>> Tom
>>
>>
>> On Wed, Oct 12, 2016 at 6:12 PM, David Winsemius
>> mailto:dwinsem...@comcast.net>
>> <mailto:dwinsem...@comcast.net <mailto:dwinsem...@comcast.net>>>
>> wrote:
>
Hi R Users,
Is it possible to visualize river flow in 3D (latitude, longitude with
respect to depth)?
The example of my data looks like. Any suggestions?
> dat1
long lat depth flow
1 1015.9 857 1.00 1.50
2 1015.9 857 1.25 1.23
3 1015.9 857 0.50 2.00
4 1015.9 858 0.10 1.95
5 1015.9 858 0.
Hi R users,
I have created four figures using ggplot2, but I am having trouble to add
"r2=XXX, p=XX" value on the upper left in each figure and also unit of X
axis of each figure are different. I was also trying to write following :
1. "rainfall (mm/year") on X axix for fig A.
2. "temp (degree C
Hi R user,
Can we calculate sample size when only mean and SE are given?
Let say one example, I have mean with SE is 0.54+-0.0517 (mean+-SE). Is
there any way to find the samples (sample size n) in that condition in R?
i think this question is not related to R, I hope you won't mind.
Thanks
Hi R Users,
I have been struggling to replace texts in a table by new text. but it
seems crazy as of I am doing it manually in R. I have very big files and
some of the text has to be replaced by another class based on another file
if the name corresponds. I was able to perform following example but
Hi R users,
I have a very big two matrices of 12 columns and over 0.5 million columns
(50,4710) and trying to get correlation value between two tables but I
could not compute it because of big files.
Would you give me any suggestion on how I can do the correlations for the
big files?
I used the fo
Hi Giorgio,
Thank you very much for the code and the link. I read it and also used but
this code changed the line into "dashed" for all variables. As I mentioned
earlier, I wanted to change for only one variable among 7 variables (for
only one variable).
Thanks
MW
On Thu, Dec 24, 2015 at 4:10 AM,
Hi R user,
I was trying to make a figure for each of four sites. Each site has 7
classes, among the 7 classes, one is average. I am wondering how I can
change the color and size of the line that was average value. I want to
highlight average value.
Similarly, I have been using smooth function ther
ote:
> Hi Marna,
> A bit hard to understand. If raw.data is a record of 11 individuals
> released at site A at Time 1 and recaptured at either A or B or neither at
> Time2 or Time3, it doesn't seem to bear any consistent relationship to the
> numeric coding in table.format or the o
Hi R users,
I am struggling to create a table in R. I did in Excel but I have a lots of
data and thought it might be easy in R but I am new in R. How to get
"output table" for this example data?
This is an example.
#
raw.data<-structure(list(Time1 = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
52 matches
Mail list logo