Thanks for providing direction. By redefining time using as.yearmon(), I got
acf() working.
Sent from my iPhone
On Jan 14, 2025, at 6:51 PM, CALUM POLWART wrote:
acf wants a time series, so tries to make one:
as.ts(myts)
Time Series:
Start = 19357
End = 20027
Frequency = 1
[1] 24957
acf wants a time series, so tries to make one:
as.ts(myts)
Time Series:
Start = 19357
End = 20027
Frequency = 1
[1] 24957 NA NA NA NA NA NA NA NA NA
[11] NA NA NA NA NA NA NA NA NA NA
[21] NA NA NA NA
For below data, I find strange results in basic time series analysis. Why does
acf() function find missing values? When crossprod(xmat) is invertible, why
does arima() find system exactly singular?
Thanks,
Naresh
x <- c(24957, 10577, -18516, 2940, -1458, 32704, -26697, -46902, 48413, -11937,
HI Rui:
First and foremost thanks for taking the time to do this. That was a typo,
it was httr and is not needed, I was careless. That request works fine on a
Mac and a Linux box. We needed to check if there was something about iour
internal network settings, our Windows setup or somethi
Às 23:47 de 31/01/2024, Roy Mendelssohn - NOAA Federal via R-help escreveu:
HI All:
We are trying to figure out a problem that is occurring with a package, and we
need a non-NOAA person with a Windows computer with the latest R to test for us
what is failing (but works on Macs and Linux from
HI All:
We are trying to figure out a problem that is occurring with a package, and we
need a non-NOAA person with a Windows computer with the latest R to test for us
what is failing (but works on Macs and Linux from different sites). Part of
the problem is there is an Akamai service in betwe
Hmm, I can't replicate (i.e., it works fine for me). What are the
results of your sessionInfo() (from a *clean* R session)?
==
R Under development (unstable) (2023-10-25 r85410)
Platform: x86_64-pc-linux-gnu
Running under: Pop!_OS 22.04 LTS
Matrix products: default
BLAS: /usr/local/lib/R/l
Hello Colleagues,
I am trying to get the Git repository using *remotes* package. I am
using *remotes::install_github("dcl-docs/dcldata")
*to get the Git repo.
However, I am getting the following error message. I have absolutely no
idea on what this error message means and how to get away with thi
On Wed, 7 Jun 2023 19:14:58 -0700
Dennis Fisher wrote:
> UNICODE: If I can generate "≥" via unicode, the problem is solved:
> mtext(side=3, paste0("N ", UNICODE, " ", XX, ": ", YY))
It should be possible to just copy & paste "≥" in the R source code
nowadays. If for some reason the script
R 4.2.3
OS X
Colleagues
This should be easy -- but not for me.
I want to plot text similar to this:
N ≥ XX: YY
where XX can be either 1 or 50 and YY is an integer
I envision that there would be two solutions:
UNICODE: If I can generate "≥" via unicode, the problem is solved:
m
Hi David,
No, read.table converts a text representation of data into a data frame object.
Jim
On Sat, Sep 24, 2022 at 2:29 AM DFP wrote:
>
> Do I need that read.table if the tst dataframe already exists in my
> system? If so, why?
>
> --
>
> Hello
Do I need that read.table if the tst dataframe already exists in my
system? If so, why?
--
Hello,
You have to load the packages involved:
library(dplyr)
library(tidyr)
library(ggplot2)
then run the full sequence. Though this is not important,
That worked, and helped my understanding. Thank you.
Hello,
You have to load the packages involved:
library(dplyr)
library(tidyr)
library(ggplot2)
then run the full sequence. Though this is not important, if you are
pivotting columnns named y1 and y2
No you don't! I do!
I don't have tst on my system.
Rui Barradas
Às 22:11 de 22/09/2022, DFP escreveu:
Do I need that read.table if the tst dataframe already exists in my
system? If so, why?
--
Hello,
You have to load the packages involved:
Hello,
You have to load the packages involved:
library(dplyr)
library(tidyr)
library(ggplot2)
then run the full sequence. Though this is not important, if you are
pivotting columnns named y1 and y2, why not name the result just y?
pivot_longer(-time, names_to = "y")
And here is complete
I'm trying to do as you suggest, but I'm not understanding what I need
to do. I asked what the line pivot_longer(-time, names_to = "y1") would
do if applied to this df:
> tst
time y1 y2
1 18:55 30 19
2 18:56 30 19
3 18:57 29 19
4 18:58 31 19
5 18:59 28 19
6 19:00 28 19
7 19:01 28 19
Hello,
This type of problems generally has to do with reshaping the data. The
format should be the long format and the data is in wide format.
Inline.
Às 23:35 de 21/09/2022, DFP escreveu:
As I said, the lines below that you provided worked well for me. Can you
explain what this line does?:
p On Behalf Of DFP
Sent: Wednesday, September 21, 2022 6:35 PM
To: Rui Barradas ; r-help@r-project.org
Subject: Re: [R] Need help plotting
[External Email]
As I said, the lines below that you provided worked well for me. Can you
explain what this line does?:
# reshape to long format
pivot_l
As I said, the lines below that you provided worked well for me. Can you
explain what this line does?:
# reshape to long format
pivot_longer(-Dtime, names_to = "NO2") %>%
-
library(ggplot2)
library(dplyr)
library(tidyr)
b %>%
mutate(Dtime
Thank you for the ideas below. That did work. I thought I had tried
"10 mins" before, but maybe I used just 10 min.
===
Yes, you can have date_breaks = "n mins" where n is any integer.
date_breaks = "15 mins"
date_breaks = "30 mins"
date_breaks = "1 hour" # or "1 hours", plural
rg
Subject: Re: [R] Need help plotting
[External Email]
"Also, IU's tech support told me yesterday that if I responded to a message
that came as plain text, my response would go out as plain text. Is that true
for this response, or is it in HTML?"
Nope, HTML. You need to set you
esterday that if I responded to a message
> that came as plain text, my response would go out as plain text. Is that
> true for this response, or is it in HTML?
>
> From: Rui Barradas
> Date: Tuesday, September 20, 2022 at 4:52 AM
> To: Jim Lemon , Parkhurst, David <
> parkh...
go out as plain text. Is that true for
this response, or is it in HTML?
From: Rui Barradas
Date: Tuesday, September 20, 2022 at 4:52 AM
To: Jim Lemon , Parkhurst, David ,
r-help mailing list
Subject: Re: [R] Need help plotting
Hello,
Now with data, here are base R and ggplot2 plots.
t is deleted or
converted and impossible or at least difficult to interpret.
Do not share confidential data. Please change some numbers or variable names
and share that.
If this helps:
1) Make sure your time variable is a datetime object.
2) At least in ggplot it should now behave as expected.
g
hould now behave as expected.
> > ggplot(df, aes(y=NO2, x=datetime)) + geom_point()
> >
> > That will be a start as a scatterplot, but the graph can be customized or
> > changed if scatterplot was not desired.
> >
> > Tim
> >
> > -Original Message
aes(y=NO2, x=datetime)) + geom_point()
>
> That will be a start as a scatterplot, but the graph can be customized or
> changed if scatterplot was not desired.
>
> Tim
>
> -Original Message-
> From: R-help On Behalf Of Parkhurst, David
> Sent: Sunday, September 18, 2
Hi David,
All I got was the rather cryptic "DFP (iPad)" below your message.
Whatever format you used for the data was blocked by the R-help mail
server. Try this command in your R session:
dput(test)
and cut and paste the output into your email. That should do it.
Jim
On Tue, Sep 20, 2022 at 7:
Hi David,
Since you used read.csv to get the data frame, the file must be i text
format. If you can include a few lines of the input (with made up NO2
values if necessary), it would be easy to respond with the required
commands and a plot.
Jim
On Mon, Sep 19, 2022 at 9:12 PM Parkhurst, David wro
s writing Rui posted another option with code for graphing.
Tim
-Original Message-
From: R-help On Behalf Of Parkhurst, David
Sent: Sunday, September 18, 2022 4:27 PM
To: r-help@r-project.org
Subject: [R] Need help plotting
[External Email]
I�ve been retired since �06 and have forgotte
mber 18, 2022 4:27 PM
> To: r-help@r-project.org
> Subject: [R] Need help plotting
>
> [External Email]
>
> I�ve been retired since �06 and have forgotten most of R. Now I have a
> use for it, with some data from Bloomington�s Environmental Commission.
>
> I have a datafr
desired.
Tim
-Original Message-
From: R-help On Behalf Of Parkhurst, David
Sent: Sunday, September 18, 2022 4:27 PM
To: r-help@r-project.org
Subject: [R] Need help plotting
[External Email]
I�ve been retired since �06 and have forgotten most of R. Now I have a use for
it, with some data
I�ve been retired since �06 and have forgotten most of R. Now I have a use for
it, with some data from Bloomington�s Environmental Commission.
I have a dataframe (obtained from read.csv) that contains numerous columns,
including time (in Excel�s 18:00 format), and DNO2, and MNO2 from two air
q
Dear All,
Thank you very much for all of your help. If anyone feels unhappy with my
words then I apologize.
Actually, I am not an expert user as a result my coding seems to be wrong
on some points. Now, it is working.
I am thankful to all of you for your kind support. Take care.
Hossain
On F
Behalf Of Md. Moyazzem
Hossain
Sent: Thursday, August 4, 2022 9:31 AM
To: r-help mailing list
Subject: [R] Need help
Dear R Experts,
I hope that you are doing well.
I am facing a problem to find out the value of the following function. I
need help in this regard.
#
a=rnorm(1000, 110, 5)
b = rn
I get 111.5303 which is much closer to the right answer.
Entering values for ff, I can work out the answer to slightly more
than 111.53030196.
Regards,
Tim
-Original Message-
From: Ebert,Timothy Aaron
Sent: Thursday, August 4, 2022 10:28 AM
To: Ebert,Timothy Aaron ; Md. Moyazzem Hossa
Dear R Experts,
I hope that you are doing well.
I am facing a problem to find out the value of the following function. I
need help in this regard.
#
a=rnorm(1000, 110, 5)
b = rnorm(1000, -0.3, 0.4)
s = length(a)
lam=0.15
thr=70
r= 10
ff = function(zz){
inner = vector("numeric", length = s
Dear Rui Barradas
Thank you very much for your prompt reply.
It works. I am grateful for your help.
Take care and best wishes.
Hossain
On Tue, Jun 28, 2022 at 5:45 PM Rui Barradas wrote:
> Hello,
>
> scale_*_manual expects a discrete vector as values, you are passing it a
> continuous one.
Hello,
scale_*_manual expects a discrete vector as values, you are passing it a
continuous one. The natural way of having a continuous variable set the
color and fill values is with a gradient scale.
I have changed geom_bar to geom_col.
Map prob to the fill aesthetic. Then, in scale_fill_cont
Dear R- Experts,
I hope that you are doing well.
I am facing a problem with adding color to a barplot. My target is to add a
bar color conditioning on the following
Values close to 1 represent "White" and values tend to 0 represent "Black".
However, I failed. The code is given below. I will be
Hi David,
As suggested earlier, providing the link of a folder contains all files.
https://drive.google.com/drive/folders/1dNmGTI8_c9PK1QqmfIjnpbyzuiCXgxFC?msclkid=4816425dd04111ec912cf8b4175aa93c
Thanks,
Ranjeet
On Wed, May 11, 2022 at 9:35 PM David Winsemius
wrote:
>
> On 5/9/22 10:01, Ranj
Dear Bert,
Thank you. Will do the same
Regards, Roopa
On Sat 16 Apr, 2022, 2:22 AM Bert Gunter While you *may* get a useful reply here, there is an
> r-sig-meta-analysis list to which this would be better posted:
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>
>
> Bert Gunter
>
>
While you *may* get a useful reply here, there is an
r-sig-meta-analysis list to which this would be better posted:
https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (
Hi all,
We are conducting network metaanalysis of 3 treatments compared to placebo
using netmeta analysis. We have mean sd values for an outcome. How do we
calculate z scores using netmeta package? Thank you
[[alternative HTML version deleted]]
___
Hello,
I am new in using R, and I need to run a multilevel analysis (on two
levels) using Cox frailty survival model on a survey data (Nigeria
Demographic and Health Survey Data).
My problem is how to write the design weight using the two weights needed
and apply them to the analysis.
I have ide
Hello,
With no loops:
cbind(
row = c(t(row(mat_1))),
col = c(t(col(mat_1))),
mat_1 = as.numeric(t(mat_1))
)
If the matrix entries are not numeric, use cbind.data.frame. This will
keep the row and column numbers as numbers, the default cbind method
would coerce them to the class of mat
mat_1= matrix( c('1','2','3','4','5','6','7','8','9'), nrow = 3, ncol =
3,byrow = TRUE)
mat_1
# Loop over my_matrix
for(row in 1:nrow(mat_1)) {
for(col in 1:ncol(mat_1)) {
cat(row,col,mat_1[row,col],"\n")
}
}
On Thu, Oct 28, 2021 at 8:01 PM Anas Jamshed wrote:
>
> where should I p
where should I place cat(row,col,mat_1[row,col],"\n")?
On Thu, Oct 28, 2021 at 1:58 PM Jim Lemon wrote:
> Hi Anas,
> How about:
>
> cat(row,col,mat_1[row,col],"\n")
>
> Jim
>
> On Thu, Oct 28, 2021 at 7:19 PM Anas Jamshed
> wrote:
> >
> > I create a matrix of size 3x3 called mat_1 and then I w
Hi Anas,
How about:
cat(row,col,mat_1[row,col],"\n")
Jim
On Thu, Oct 28, 2021 at 7:19 PM Anas Jamshed wrote:
>
> I create a matrix of size 3x3 called mat_1 and then I want to iterate over
> all the values one by one and print the element as well as the position in
> the matrix:
>
> My code is :
I create a matrix of size 3x3 called mat_1 and then I want to iterate over
all the values one by one and print the element as well as the position in
the matrix:
My code is :
mat_1= matrix( c('1','2','3','4','5','6','7','8','9'), nrow = 3, ncol =
3,byrow = TRUE)
mat_1
# Loop over my_matrix
for(ro
Bert,
> findprm <- function(n){
>nn <- seq.int(2, n)
>i <- 2
>while(i <= floor(sqrt( n))){
> nn <- nn[(nn <= i) | (nn %% i > 0)]
> i <- nn[nn > i][1]
>}
>nn
> }
+1 -- thanks!
__
R-help@r-project.org mailing list -- To UN
try to guess and certainly won't supply a valid solution here!
-Original Message-
From: R-help On Behalf Of Anas Jamshed
Sent: Tuesday, October 26, 2021 4:39 PM
To: Rolf Turner
Cc: R-help Mailing List
Subject: Re: [R] Need help in R
Its not homework . Basically i want to get easy so
Well, OK. I'll provide you an alternative and explanation.
The way you are going about it would work, but it is usually not the best
approach in R. Typically, the key in R is to whenever possible use whole
object manipulation rather than iteration. This hides the iteration details
and often pushes
Its not homework . Basically i want to get easy solution:
I am trying this for ist problem:
n= seq(1,100)
for (j in n:100) {
f = 1
i = 2
n = j
while (i <= n / 2) {
if (n %% i == 0) {
f = 0
break
}
i = i + 1
}
if (f ==
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
One of the items mentioned in the Posting Guide is that homework questions are
not okay... we don't know what your instructor is looking for, and the
On Wed, 27 Oct 2021 01:09:50 +0500
Anas Jamshed wrote:
> I need help to these questions
>
> ### Question 1
> Create a variable containing a sequence of numbers from 1 to 100:
>
> Iterate over the variables and print those numbers which are prime.
>
>
> ### Question 2
> Create a matrix of si
This looks suspiciously like homework and this list does have a no homework
policy. If it is not homework, please forgive the assumption.
> On Oct 26, 2021, at 4:09 PM, Anas Jamshed wrote:
>
> I need help to these questions
>
> ### Question 1
> Create a variable containing a sequence of numbe
I need help to these questions
### Question 1
Create a variable containing a sequence of numbers from 1 to 100:
Iterate over the variables and print those numbers which are prime.
### Question 2
Create a matrix of size 3x3 called mat_1:
Iterate over all the values one by one and print the ele
Hello,
Are you looking for what follows Andrew's code below to download and
untar the files?
read_one_gz_file <- function(x, path){
fl <- file.path(path, x)
tryCatch({
read.table(zz <- gzfile(fl))
},
warning = function(w) w,
error = function(e) e
)
}
URL <-
"https://ftp.ncb
but the point is that where should I start from now
On Tue, Aug 24, 2021 at 7:43 AM Andrew Simmons wrote:
> Hello,
>
>
> I see what you're saying that the .tar archive contains many more
> compressed files, but that's not necessarily a problem. R can read directly
> from a compressed file withou
Hello,
I see what you're saying that the .tar archive contains many more
compressed files, but that's not necessarily a problem. R can read directly
from a compressed file without having to decompress it beforehand. I
modified my code to look a little more like yours:
# need to do 'path.expand'
sir after that I want to run:
#get the list of sample names
GSMnames <- t(list.files("~/Desktop/GSE162562_RAW", full.names = F))
#remove .txt from file/sample names
GSMnames <- gsub(pattern = ".txt", replacement = "", GSMnames)
#make a vector of the list of files to aggregate
files <- list.files(
There are some differences in R, between Windows and Linux.
You could try the 'shell' command instead.
#On Windows
?shell
On Tue, Aug 24, 2021 at 4:53 AM Anas Jamshed wrote:
>
> I have the file GSE162562_RAW. First I untar them
> by untar("GSE162562_RAW.tar")
> then I am running like:
> system(
Hello,
I tried downloading that file using 'utils::download.file' (which worked),
but then continued to complain about "damaged archive" when trying to use
'utils::untar'. However, it seemed to work when I downloaded the archive
manually. Finally, the solution I found is that you have to specify
I am trying this URL: "
https://ftp.ncbi.nlm.nih.gov/geo/series/GSE162nnn/GSE162562/suppl/GSE162562_RAW.tar
"
but it is not giving me any file
On Mon, Aug 23, 2021 at 11:42 PM Andrew Simmons wrote:
> Hello,
>
>
> I don't think you need to use a system command directly, I think
> 'utils::untar'
Hello,
I don't think you need to use a system command directly, I think
'utils::untar' is all you need. I tried the same thing myself, something
like:
URL <- "https://exiftool.org/Image-ExifTool-12.30.tar.gz";
FILE <- file.path(tempdir(), basename(URL))
utils::download.file(URL, FILE)
utils::
I have the file GSE162562_RAW. First I untar them
by untar("GSE162562_RAW.tar")
then I am running like:
system("gunzip ~/Desktop/GSE162562_RAW/*.gz")
This is running fine in Linux but not in windows. What changes I
should make to run this command in windows as well
[[alternative HTML ve
On 6/9/21 5:06 AM, Biplab Nayak wrote:
Hi Greg,
Please find the objective of the code(bold) and code mentioned below. I was
trying to do to achieve the below objective but somehow it's not working.
The phrase "somehow not working" is not a useful description of an outcome.
1.Order assess
You seem to need to educate yourself as to what "plain text" means, and to read
the Posting Guide for this mailing list. Word documents are very definitely NOT
plain text. Stop attempting to communicate via formatted text on this mailing
list.
For security reasons this mailing list removes most
Hi Greg,
Please find the objective of the code(bold) and code mentioned below. I was
trying to do to achieve the below objective but somehow it's not working.
1.Order assessment based on the latest due date so select input
automatically shows the order of assessment name.
2.Filter based on the o
Hi Greg,
Please find the objective of the code(bold) and code mentioned below. I was
trying to do to achieve the below objective but somehow it's not working.
1.Order assessment based on the latest due date so select input automatically
shows the order of assessment name.
2.Filter based on the o
Hi Greg,
Please find the R Code in the word file attached here. Its plain text format
Thanks & Regards
Biplab Nayak
On Wed, Jun 9, 2021 at 12:15 AM Greg Minshall wrote:
> Biplab,
>
> i'm not sure how to help you here, but this list pretty much runs on
> plain ASCII (or, these days, utf-8) e-ma
Biplab,
i'm not sure how to help you here, but this list pretty much runs on
plain ASCII (or, these days, utf-8) e-mail. for the most part, without
attachments. so, simply-formatted text, including code, with some
mechanism in the code to initialize any data structures (data frames,
matrices, et
Hi Bert,
I have attached the word file with the R code.
Thanks & Regards
Biplab Nayak
On Tue, Jun 8, 2021 at 1:07 PM Bert Gunter wrote:
> I do not wish to be involved in this thread other than to note that you
> were, I believe, asked not to post in HTML. And because you did, you will
> find t
I do not wish to be involved in this thread other than to note that you
were, I believe, asked not to post in HTML. And because you did, you will
find that "Bold" highlighting does not exist in your text below. I have no
idea whether that matters for your query or not, but there it is.
Bert Gunte
Hi Rui,
Please find the code(bold) below I was trying to do to achieve the
achieve:But somehow its not working.
1.Order assessment based on the latest due date so select input
automatically show the order of assessment name.
2.Filter based on the one name or multiple names in the select input
li
Hello,
Please cc the list.
R-Help is not a code writing service, it's a mailing list for doubts on
R code. I'm sorry but without answers to the below questions I am not
going to answer.
What have you tried? What went wrong?
Hope this helps,
Rui Barradas
Às 04:01 de 08/06/21, Biplab Nayak
Hi Rui,
Please find the data file attached here.
Thanks & Regards
Biplab Nayak
On Mon, Jun 7, 2021 at 4:21 PM Rui Barradas wrote:
> Hello,
>
> This is not reproducible, we don't have access to ttclasses.csv.
> Can you post sample data? Please post the output of
>
> dput(ttclasses)
>
> Or, if i
Hello,
Thanks for the data.
There were some, not many, bugs that I have corrected below.
library(tidyverse)
#library(stringr)# attached with tidyverse
#library(readr)
library(shiny)
ttclasses <- read_csv("~/tmp/ttclasses.csv")
#Filter data
ttclasses <-ttclasses %>%
filter(str_detect(as
Hello,
This is not reproducible, we don't have access to ttclasses.csv.
Can you post sample data? Please post the output of
dput(ttclasses)
Or, if it is too big, the output of
dput(head(ttclasses, 20))
Hope this helps,
Rui Barradas
Às 18:03 de 07/06/21, Biplab Nayak escreveu:
Hi All,
I N
Hi All,
I Need a bit of help to fix the code.
Code:
library(readr)
library(shiny)
ttclasses <- read_csv("ttclasses.csv")
#Filter data
library(stringr)
library(dplyr)
ttclasses <-ttclasses %>%
filter(str_detect(assessment, "Assignment"))
ttclasses <-ttclasses %>%
filter(str_detect(name, "Name")
Thanks. What editor do you use? I'm working in a Mac, if that makes a
difference.
From: Gerrit Draisma
Date: Tuesday, February 9, 2021 at 5:10 PM
To: Parkhurst, David F.
Cc: r-help@r-project.org
Subject: Re: [R] Need help using lattice
Ha David,
I do not know.
It must be that your Apr
=factor(3:12, levels=1:12,
labels=AprToDec, ordered=TRUE))
I get + signs in front of monames and labels, again as expected, but then it
gives me another + sign. And if I try to add another ), it keeps giving me +
signs. What is happening here?
From: Gerrit Draisma
Date: Tuesday, Febr
labels=AprToDec, ordered=TRUE))
I get + signs in front of monames and labels, again as expected, but then it
gives me another + sign. And if I try to add another ), it keeps giving me +
signs. What is happening here?
From: Gerrit Draisma
Date: Tuesday, February 9, 2021 at 6:14 AM
To: Park
Thank you.
From: Gerrit Draisma
Date: Tuesday, February 9, 2021 at 6:14 AM
To: Parkhurst, David F.
Cc: r-help@r-project.org
Subject: Re: [R] Need help using lattice
Ha David,
Thanks for your reply.
For your last question, you have to change month into an ordered factor
variable:
library
Ha David,
Thanks for your reply.
For your last question, you have to change month into an ordered factor
variable:
library(lattice)
df <- expand.grid(site=c("een","twee","drie","vier","vijf"),
month=factor(3:12,levels=1:12,
labels=month.abb, ordere
Hello;
q=3 #dimension of variable Y
R=c(5,4,3);# Number of partition of each component of variable Y
if(length(R) != q) stop("The size of R must be equal to q")
n=25 # Sample size
N=c(25,50,100,200,300,400,500,1000) #different sample sizes
# Creation of an n11 list containing the sizes of the d
David,
Is this what you are looking for?
library(lattice)
df <- expand.grid(site=c("een","twee","drie","vier","vijf"),
month=1:12)
df$conc <- rnorm(dim(df)[1])
dotplot(month~conc|site,data=df)
HTH Gerrit
__
R-help@r-project.org mailing
ry 7, 2021 8:02 PM
> > To: r-help@r-project.org
> > Subject: [R] Need help using lattice
> >
> > I have a dataframe comprising a vector of E. coli concentrations, a
> vector of
> > months when the samples were taken, and a vector of sampled sites. I�d
> > like t
Hallo again
Your attachment is discarded by listserv so we did not get it. Do not use
attachments.
Cheers
Petr
From: Ablaye Ngalaba
Sent: Monday, February 8, 2021 3:04 PM
To: PIKAL Petr
Subject: Re: [R] need help to create a 3-dimensional list
Sorry, I thought I would make
-project.org
> Subject: [R] need help to create a 3-dimensional list
>
> Hello,
> please, I need help to calculate n_l properly for my attachment.
>
>
>
> Sincerely
> __
> R-help@r-project.org mailing li
Hello,
please, I need help to calculate n_l properly for my attachment.
Sincerely
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide h
id
> F.
> Sent: Sunday, February 7, 2021 8:02 PM
> To: r-help@r-project.org
> Subject: [R] Need help using lattice
>
> I have a dataframe comprising a vector of E. coli concentrations, a vector of
> months when the samples were taken, and a vector of sampled sites. I�d
>
I have a dataframe comprising a vector of E. coli concentrations, a vector of
months when the samples were taken, and a vector of sampled sites. I�d like to
produce a lattice with sites along the horizontal axis, and months on the
vertical. Each site-month box would then contain concentrations
Hello,
Please cc the list, R-Help is threaded and your doubt and answers might
be of interest to others.
With a vector Y, you want 0 in all Y != l and 1 in all Y == l?
n_l <- function(Y, l) as.integer(Y == l)
Hope this helps,
Rui Barradas
Às 11:26 de 30/01/21, Ablaye Ngalaba escreveu:
H
Hello,
Maybe this?
n_l <- function(Y, l, na.rm = FALSE) sum(Y == l, na.rm = na.rm)
set.seed(2020)
q <- 6
y <- sample(q, 10, TRUE)
l <- 4
n_l(y, l)
#[1] 3
Hope this helps,
Rui Barradas
Às 14:27 de 29/01/21, Ablaye Ngalaba escreveu:
Hello,
please, I need to calculate the indicator function
Perhaps (in R):
n_i <- cumsum( Y==l )
You should read further regarding R's logical class, and operators that
work on it, and how it is coerced.
--
David
On 1/29/21 6:27 AM, Ablaye Ngalaba wrote:
> Hello,
> please, I need to calculate the indicator function as I underlined in my
> attached
Is this a homework problem? The posting guide linked below explicitly says:
"*Basic statistics and classroom homework:* R-help is not intended for
these."
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Brea
This list has a no-homework policy. Referring to the posting guide linked
below:
"*Basic statistics and classroom homework:* R-help is not intended for
these."
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley B
Go to page http://zzz.bwh.harvard.edu/plink/profile.shtml and follow the
help to generate a basic allele score using your independently associated
SNPs. Use R to make the myprofile.rawfile required.
I am unable to generate .raw file which will contain allele score
I have tried this script:
resul
You have already asked this and people gave you a variety of answers.
Just asking again without clarifying why those answers did not help you
is not going to solve your problem.
Tell us what you tried and why it failed might help.
Michael
On 29/10/2020 07:50, Ablaye Ngalaba wrote:
Hello,
I n
1 - 100 of 838 matches
Mail list logo