There is also the possibility that the OP believes that the function calls
are passing by reference.
On Mon, Mar 30, 2020 at 5:55 PM Richard M. Heiberger wrote:
> You need one more line In your function.
>
> addday <- function(stp,mcp,stpos,mcpos){
> stpos<-c(stpos,stp)
> mcpos<-c(mcpos,mcp)
>
A data frame is a special case of a list. It is a list of its columns.
> is.list( your_data_frame )
# TRUE
On Tue, Mar 31, 2020 at 4:04 PM Ivan Calandra wrote:
> Dear useRs,
>
> I have a very simple question:
> On a simple data.frame (i.e. each element is a vector), ncol() and
> length() will
9772-243
> https://www.researchgate.net/profile/Ivan_Calandra
>
> On 31/03/2020 15:26, Eric Berger wrote:
> > A data frame is a special case of a list. It is a list of its columns.
> >
> > > is.list( your_data_frame )
> >
> > # TRUE
> >
> >
> >
Rui wrote: " This is SO dependent,"
I think it's a typo. He meant to write
"This is OS dependent"
The Stack Overflow link he provided has info for both Windows and Linux.
On Thu, Apr 2, 2020 at 4:59 PM Jeff Newmiller
wrote:
> What does SO dependent mean? Cross posted with Stack Overflow?
>
> Th
Hi Orlando,
This is not a reproducible example because of the line
MyGraphData <- read.graph ( file = "0.edges" , directed = FALSE )
We don't have the file "0.edges" .
But here's an example that reproduces the error message. Maybe it will help
you find your problem.
DF <- data.frame( x=NA, y=5
RStudio provides a terminal window. You could print out the environment
variables there and then adjust the ones in your R console session
appropriately. I could give you some guidance under linux, but it seems you
use Windows. Perhaps others can help with the details.
On Tue, Apr 14, 2020 at 12:1
Hi Sam,
This should be straightforward. But to help out the people who could give
you an answer it would be better if you could provide the information a bit
more clearly as follows:
1. send your email in plain text mode. If you use gmail, when you are
composing your email, you can click on the 3 d
Hi Sam,
My code below adds new columns to your data frame so you have the original
columns in order to compare.
(Also this could help in case there are a few rows that don't work in the
full set.)
> x <- read.csv("Fight.csv", stringsAsFactors = F, header = F)
> x$V3 <- sub("\\\"","",x$V1) # remo
Some comments on the contributions:
a) for Petr's suggestion, to return the desired structure modify the
statement to
t(aggregate(t(dfr), list(idx), median)[,-1])
And, although less readable, can certainly be put in a one-liner
solution by removing the idx definition
t(aggregate(
Hi Bhaskar,
Why not just create a function that does the repetitive work, such as
doOne <- function( suffix ) {
base_url <- "abcd" # This remains constant
b <- "api_key"# the api key - this remains constant
c <- paste("series_id=",suffix,sep="")
full_url = paste0(
Hi Luigi,
the problem is not the first graph vs the second graph. The first
graph would also show the same effect if you added type='l' to the
plot command.
There are various ways to approach this. A quick search turned up the
following which gives you different options.
https://stackoverflow.com/q
Can you create a reproducible example?
Your question involves objects that are unknown to us. (geo1, trnd1_tbl)
On Tue, May 12, 2020 at 2:41 PM Poling, William via R-help <
r-help@r-project.org> wrote:
> #RStudio Version Version 1.2.1335 need this one--> 1.2.5019
> sessionInfo()
> # R version 4.0
2352 8 0.00340
> 5 CHICAGO IL2352 17 0.00723
> 6 COLUMBUS OH2352 11 0.00468
> 7 CUMMING GA2352 8 0.00340
> 8 DALLASTX2352 8 0.00340
> 9 ERIE PA
Adrien,
you posted this same item 3 days ago to this list. And someone responded to
it.
Why are you posting the identical thing again to this list?
As Bert writes, you should post to the r-sig-debian list.
Eric
On Wed, May 13, 2020 at 4:38 AM Bert Gunter wrote:
> Please, please, please ... RSt
Hi Christofer,
Look at https://cran.r-project.org/web/views/NumericalMathematics.html
and within that page search for Symbolic Mathematics. It shows two
packages: Ryacas and rSymPy.
I have no experience with them but they may be a good place to start.
HTH,
Eric
On Thu, May 14, 2020 at 8:43 PM Ch
ing... and for
> > interactive use I prefer wxMaxima and some manual translation to R.
> > On May 14, 2020 10:50:56 AM PDT, Eric Berger
> wrote:
> > >Hi Christofer,
> > >Look at https://cran.r-project.org/web/views/NumericalMathematics.html
> > >and within tha
Hi Ana,
This is a very common question about ggplot.
A quick search turns up lots of hits that answer your question. Here
are a couple
https://community.rstudio.com/t/trouble-scaling-y-axis-to-percentages-from-counts/42999
https://stackoverflow.com/questions/3695497/show-instead-of-counts-in-charts
Hi Luigi,
I am not familiar with the R0 package but I took a quick look.
The example in the documentation sets begin and end to integers.
Try setting begin = 1, end = 121 and see if that works.
HTH,
Eric
On Fri, May 22, 2020 at 1:17 PM Luigi Marongiu wrote:
>
> Hello,
> I am trying ot get the R0
> :
> If both 'begin'= 1 and 'end'= 117 are provided, they must be of the same
> class (dates, character strings or integers).
> ```
>
>
>
> On Fri, May 22, 2020 at 1:51 PM Eric Berger wrote:
>>
>> Hi Luigi,
>> how about begin=1
Hi Christofer,
Did you try web search? I entered 'R CRAN Bayesian parameter
estimation with MCMC'
and it came back with the following which seems relevant.
https://cran.r-project.org/web/packages/airGR/vignettes/V02.2_param_mcmc.html
There are other search results, such as:
https://cran.r-project
Why not just reorder the elements of the list so they should match?
t1 <- t1[ names(t1)[order(names(t1))]]
t2 <- t2[ names(t2)[order(names(t2))]]
identical(t1,t2)
On Thu, May 28, 2020 at 7:52 AM John Harrold
wrote:
> Is there a way to compare t1 and t2 above such that the name is used
> ins
Hi Martin,
This is a known bug. Definitely related to Ubuntu (debian), libopenblas and
possibly specific hardware.
Here's a bug report on the Debian list
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961725
Best,
Eric
On Sun, May 31, 2020 at 4:38 AM Bert Gunter wrote:
> No clue.
>
> Worke
Hi John,
This is a bit off-topic for this mailing list as your issue is a
linux, specifically Fedora, issue, and not R.
I don't use Fedora but I did a quick Google search on
fedora missing package .pc file
and that came back with a lot of hits. This one in particular should
be a good place to
Hi Jeff,
I tried to reproduce your problem with the package's example and I did
not get an error.
Here's the output from my sessionInfo().
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-g
Hi Luigi,
I took a quick look.
First error:
You wrote
O = mle2(minuslogl = holling, start = list(a = A, h = B, x = X))
it should be b=B (h is not an argument of holling())
The error message gave very precise information!
Second error:
You wrote
O = mle2(minuslogl = nll, start = list(a = A, h =
use the log-likelihood function:
> ```
> O = mle2(minuslogl = nll, start = list(p = c(A, B), n = 5720, x = X))
> > Error in mle2(minuslogl = nll, start = list(p = c(A, B), n = 5720, :
> some named arguments in 'start' are not arguments to the specified
> log-li
Hi Emma,
You write
"I get numbers that are exponential (e.g., 1.877030e+01) "
1.877030e+01
is scientific notation. It means 1.877030 * 10 ( = 18.7703).
This seems like a perfectly good percentile.
HTH,
Eric
On Thu, Jul 2, 2020 at 4:12 PM Emma Parrish
wrote:
> Hello all,
> I am having some t
Hi Kathan,
How about trying to create a *minimal* reproducible example, e.g. with a
list of two data frames, where each data frame has 5 rows,?
My guess is that there is a good chance that when you try to create such an
example, you will discover the problem yourself.
In the event that you create t
Hi Christopher,
This seems pretty standard and straightforward, unless I am missing
something. You can do the "full join" without changing variable names.
Here's a small code example with two tibbles, a and b, where the
column 'x' in a corresponds to the column 'u' in b.
a <- tibble(x=1:15,y=21:35
xn <- as.numeric(sub("c",".7",sub("b",".5",sub("a",".3",xc
On Sat, Jul 11, 2020 at 5:09 AM Richard O'Keefe wrote:
> This can be done very simply because vectors in R can have
> named elements, and can be indexed by strings.
>
> > stage <- c("1" = 1, "1a" = 1.3, "1b" = 1.5, "1c" = 1.7,
> +
Hi Milu,
Jim gave a good solution. Another approach is to use standard packages
and objects.
In particular 'ts' (time series) objects from the stats package, and
'xts' (extensible time-series) objects from the xts package.
library(xts)
# construct dummy data
z <- rnorm(36)
# convert it into a mont
Hi Andy,
I believe this is because R 4.0 has changed the default behavior of
data.frame().
Prior to 4.0, the default was stringsAsFactors=TRUE.
In 4.0, the default is stringsAsFactors=FALSE.
If you run your code in R 3.6.1 and change the command to
data <- data.frame(name,values,stringsAsFactors=
Hi Pedro,
Reading R help pages definitely takes practice.
Here's a tip: when you bring up the help page, scroll down to the bottom to
see if there are examples (there usually are.)
I find that seeing examples often provides enough information to let you
figure out what you need to do.
HTH,
Eric
What happens when you give the command
list.files(".","hw1_data")
?
On Fri, Jul 24, 2020 at 3:53 PM Mounica Miriyala <
mounicamiriyala0...@gmail.com> wrote:
> HI,
> I am currently taking my week 1 quiz 1. The quiz has 1 to 20 questions in
> which 11 to 20 should be dealt with dataset given by th
Duncan writes:
>> " ... If you're using RStudio, a really convenient way to view the source
>> ..."
This is fantastic! Thank you for this Duncan.
On Thu, Jul 30, 2020 at 3:45 PM Duncan Murdoch wrote:
>
> On 29/07/2020 6:34 p.m., Jeff Newmiller wrote:
> > To begin with, don't assume it is in C++
If the forecast.date column is of type character you can use lubridate to
do this:
> library(lubridate)
> a <- "2020-08-01 12:00:00"
> year(a)
# [1] 2020
> month(a)
# [1] 8
etc
On Sun, Aug 2, 2020 at 7:24 PM Philip wrote:
> Below is some Weather Service data. I would like to parse the foreca
Hi Frederik,
(short answer) modify the assignment statement to
agg_d_h <- rbind( agg_d_h, data.frame(Group.date=next_date,x=0) )
Note: replace x=0 by your-variable-name=0
Note: left-hand-side of the assignment statement should be agg_d_h
(longer answer) Your approach is far from the b
library(lubridate)
a <- "20200403"
lubridate::ymd(a)
# 2020-04-03
HTH,
Eric
On Wed, Aug 12, 2020 at 5:57 PM Stephen P. Molnar
wrote:
> i have written an R script which allow me to plot the number of Covid-10
> cases reported by he state of Ohio. In that se t of data the date format
> is in the
t;2001-01-02" ## the default format for the print method for Date
> objects
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along and
> sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County&qu
Alternatively, melt() from the reshape2 package.
library(reshape2)
melt(x,id.vars="date",measure.vars=c("down","uc","up"),variable.name
="direction",value.name="percentage")
HTH,
Eric
On Mon, Aug 17, 2020 at 10:49 AM Thierry Onkelinx via R-help <
r-help@r-project.org> wrote:
> You are looking
swer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>
> ///////
>
> <https://www.inbo.be>
>
>
> Op ma 17 aug. 2020 om 09:52 schre
Hi Valerio,
I did a copy-paste on your reproducible example and I had no problem with
chol(nls.out$hessian).
In addition to summary() you can look at str() to display the structure of
any R object.
> str(nls.out)
List of 9
$ par :List of 3
..$ a: num 8.99
..$ b: num -1.01
..$ c: num 6.
mydata[ intersect( grep("ConfoMap", mydata), grep("GuineaPigs", mydata) ) ]
On Wed, Aug 19, 2020 at 6:13 PM Bert Gunter wrote:
> "&" is not a regex metacharacter.
> See ?regexp
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along and
> sticking things int
Hi Eberhard,
Here is one possibility using dplyr.
library(dplyr)
set.seed(3)
## set up some fake data
dtV <- as.Date("2020-08-01") + 0:4
x <- sample(dtV,20,repl=TRUE)
provider <- sample(LETTERS[1:3],20,repl=TRUE)
lDf <- data.frame(Provider=provider,CollectionDate=x,stringsAsFactors=FALSE)
## get
Hi Elham,
You are not giving us much to go on here.
Show us the commands that (a) confirm there are no NA's in the first column
of z
and (b) output a row of z that has an NA in the first column.
Here's how one might do this:
(a) sum(is.na(z[,1]))
(b) z[ match(TRUE, z[,8] %in% c("11","12","14")), ]
Good point! :-)
On Wed, Aug 26, 2020 at 5:55 PM peter dalgaard wrote:
> Offhand, I suspect that the NAs are in the 8th column.
>
> > On 26 Aug 2020, at 10:57 , Elham Daadmehr wrote:
> >
> > Hi all,
> >
> > I have a simple problem. I get stuck in using the imported spss data
> (.sav)
> > using
c(1:3)[c(1,NA,3)]
[1] 1 NA 3
On Wed, Aug 26, 2020 at 6:06 PM Elham Daadmehr wrote:
> Thanks guys. but I'm a bit confused. the input is the first column (z[,1]
> and z1[,1]).
> How is it possible that a subset of a non-NA vector, contains NA?
>
> On Wed, Aug 26, 2020 at
Hi Robert,
You don't provide a self-contained reproducible example, so I am just
guessing here.
I doubt your theory that the error is related to R. More likely the step
that creates a data frame from reading
the CSV is probably resulting in different data frames in the two cases. I
recommend that y
v <- as.numeric(matrix(unlist(x),ncol=5,byrow=TRUE))
v
[1] 7 2 6 13 5 9 1 14 15 4 8 12 10 11 3
On Fri, Sep 27, 2024 at 8:33 AM Deepayan Sarkar
wrote:
>
> > unsplit(x, f)
> [1] 7 2 6 13 5 9 1 14 15 4 8 12 10 11 3
>
> Is more general (works if the subgroups are imbalanced), and
I have never used Spack but I took a quick look at their website. They have
the option to install binaries. Perhaps this could work for you and avoid
the compilation error. Here is where they describe how to do it:
https://spack.io/spack-binary-packages/
On Wed, Nov 27, 2024 at 9:29 AM Oren Shani
might work but netmetabin may cause problems.
> I'll notify Mathias Harrer!
>
> BW
> Miland
>
> --
> *From:* Eric Berger
> *Sent:* 06 January 2025 08:24
> *To:* Miland Joshi
> *Cc:* r-help@R-project.org
> *Subject:* Re: [R] Possible
The explanation is likely that class(x) returns a character vector of
length > 1.
If you go into the code you can achieve what is probably intended without
triggering this error by replacing that statement with the following:
if (inherits(x,"netmeta")) ...
HTH,
Eric
On Mon, Jan 6, 2025 at 9:57
This is because options(digits=3) specifies the number of significant
digits, not the number of decimal places.
See ?options and search for digits.
> a <- 12.345
> options(digits=4)
> print(a)
[1] 12.35
> options(digits=5)
> print(a)
[1] 12.345
> options(digits=2)
> print(a)
[1] 12
>
On Sat, Nov
Hi Erin,
I plugged your question into CatGPT 4o and it gave the following message,
which might help:
If R was installed *before* you installed the Tcl/Tk development packages,
it might not have been built with Tcl/Tk support.
Check if R has Tcl/Tk support:
> capabilities("tcltk")
If that return
501 - 554 of 554 matches
Mail list logo