Hi Brian,
I have never tried Rattle but I did a quick search and found this link
which might give some clues.
https://book.huihoo.com/data-mining-desktop-survival-guide/Installing_GTK.html
Good luck,
Eric
On Tue, Dec 7, 2021 at 1:29 PM Brian Lunergan wrote:
>
> Evening folks:
>
> Hope I'm in t
> a <- cbind(c(xr1,xs1),c(xr2,xs2))
> a[duplicated(a)]
[1] 4 4
On Thu, Dec 16, 2021 at 10:18 PM Erin Hodgess wrote:
>
> Hello!
>
> I have the following:
>
> cbind(xr1,xr2)
>
> xr1 xr2
>
> [1,] 8 0
>
> [2,] 7 1
>
> [3,] 6 2
>
> [4,] 5 3
>
> [5,] 4 4
>
> [6,] 3
You can run a test. Multiply all your data by a scalar, say 2.
If this changes the result lme_mod$sigma by a factor of 2, then it is
a std deviation.
If it changes the result by a factor of 4, then it is a variance.
HTH,
Eric
On Sat, Dec 18, 2021 at 11:26 AM Courtney Van Den elzen
wrote:
>
> Hi
Try replacing
"c:/temp/f[i].jpg"
with
paste0("c:/temp/",f[i],".jpg")
On Wed, Dec 22, 2021 at 7:08 PM Kai Yang via R-help
wrote:
> Hello R team,I want to use for loop to generate multiple plots with 3
> parameter, (y is for y axis, c is for color and f is for file name in
> output). I created a
Re: constructive criticism to make this list more useful to more people:
Suggestion 1: accommodate questions related to non-base-R packages
This has been addressed by many already. The current
de facto situation is that such questions are asked and often answered.
Perhaps th
x[apply(y,MAR=1,sum) > 0,]
On Fri, Feb 18, 2022 at 10:24 PM Li, Aiguo (NIH/NCI) [E] via R-help <
r-help@r-project.org> wrote:
> I have tow dataframes as below:
> > x
> id g
> 1 1 21
> 2 3 52
> 3 2 43
> 4 4 94
> 5 5 35
>
> > y
> id g
> 1 1 1
> 2 0 0
> 3 0 1
> 4 1 0
> 5 1 0
>
> Resu
Please confirm that when you do the manual load and check that f(v*)
matches the result from qsub() it succeeds for cases #1,#2 but only fails
for #3.
On Fri, Mar 4, 2022 at 10:06 AM Arthur Fendrich wrote:
> Dear all,
>
> I am currently having a weird problem with a large-scale optimization
> r
try changing
Bse_ftv = mean(Bse_ftv)
to
Bse_ftv_mean = mean(Bse_ftv)
On Fri, Mar 11, 2022 at 4:15 PM Jeff Reichman
wrote:
> r-help forum
>
>
>
> When I run the following code
>
>
>
> my_tbl %>%
>
> mutate(Bse_bwt = round(Bse_bwt * 2) / 2) %>%
>
> group_by(Cat, Bse_bwt) %>%
>
> summarize(co
At the R console prompt do:
> table
It prints out the source of the table() function. The first thing there is
the definition of list.names()
HTH,
Eric
On Wed, Mar 30, 2022 at 12:27 PM Göran Broström
wrote:
> I am trying to redefine the default behavior of base::table by editing
> .Rprofile
library(dplyr)
my_df |> group_by(my_category) |> summarise(my_z = cor(my_x, my_y))
On Sat, Apr 9, 2022 at 4:37 AM Richard M. Heiberger wrote:
> look at
> ?mapply
> Apply a Function to Multiple List or Vector Arguments
>
> to see if that meets your needs
>
> > On Apr 08, 2022, at 21:26, Kelly Th
This looks like homework, which is not permitted on this list. But
giving you the benefit of the doubt, here are two ways to do it
> as.matrix(val_df) * matrix(rep(weights$value,5),ncol=3,byrow = TRUE)
ABC DEF ONS
[1,] 10 2 500
[2,] 20 4 500
[3,] 10 20 1000
[4,] 10 4 500
[5,]
I have no experience with this but a Google search came up with
CRAN support.BWS
See https://cran.r-project.org/web/packages/support.BWS/index.html
On Wed, Apr 13, 2022 at 4:37 PM Dr Cazhaow Qazaz
wrote:
> Hi All,
>
> Any recommendations for a R package to perform MaxDiff analysis?
>
> Thank y
Hi Paul,
I am not sure I understand your question, but perhaps the following is helpful.
In particular, the apply() function used with MAR=1, applies a
function to a matrix row-wise.
set.seed(123)
m <- matrix(sample(1:6,5*12,replace=TRUE),ncol=12) ## dummy data
m
[,1] [,2] [,3] [,4] [,5] [,6]
M[,x==1] is not the same as M[,x] :-)
However, M[,!!x] is the same as M[,x==1] and saves one character!
The point of this is "I can name that tune in ... " (as if that was not
obvious)
On Mon, Apr 25, 2022 at 5:30 PM Bert Gunter wrote:
> x == 1 is the same as M[, x] so your expression is the s
Hi Achim,
My point was that tsbox (apparently) provides tools to convert zoo -->
ts which should help the OP.
On Sun, May 1, 2022 at 5:56 PM Achim Zeileis wrote:
>
> On Sun, 1 May 2022, Eric Berger wrote:
>
> > Hi Naresh,
> > The tsbox package on CRAN -
> >
as.numeric(by(RecallSmall[1:4,"value"],RecallSmall[1:4,"ID"],acf,na.action=na.pass,plot=FALSE)[[1]]$acf)
On Tue, May 10, 2022 at 8:29 PM Sorkin, John
wrote:
> I am using the by function to run the acf function. Each run of the by
> function returns more information than I want. All I want is th
The model that you are fitting to the data is an AR(2) model, which means
y(t) = a0 + a1 * y(t-1) + a2 * y(t-2) + eps(t) (1)
The fitting procedure estimates the coefficients a0, a1, a2 (and the
variance of eps).
After the coefficients have been estimated, the fitted values can be
Hi Nick,
I have no experience with this package but I just installed it with no
problem and found the help and ran the functions.
> library(DescTools)
> ?VonNeumannTest <-- works fine
> VonNeumannTest(d.pizza$temperature) <-- suggested in the help page; works
> fine
> ?BartelsRankTest <-- wor
Can you bring up R in a shell? Do you get the same message?
(Also, set your email to send plain text. HTML versions are deleted.)
On Thu, Sep 15, 2022 at 11:27 AM Farah Al Saifi wrote:
>
> Dear Sir/Madam
>
> After the update of the new version of R 4.2.1, an error message ( Error in
> nchar(ho
Is there a way to download a file from that site without registering for
the site?
If you have a unix/linux shell, what does the 'file' command output?
$ file foo.gz
On Thu, Sep 15, 2022 at 2:11 PM Nick Wray wrote:
> Hello
>
> I am trying to download data sets from the 1 km Resolution UK Comp
Hi Nick,
Here's one way to do it. It is based on the heuristic that you keep
each line with the correct number of fields. The correct number of
fields is automatically determined by the number of fields in the last
line of the file.
Here's the contents of a sample csv file - "tmp3.csv" where the
What is the output of
> class(b$time)
?
Also, start sending your emails in plaint text format, if possible.
On Mon, Sep 19, 2022 at 2:12 PM Parkhurst, David wrote:
>
> I have a dataframe obtained using read.csv from an excel file. Its first
> column is times, running from 18:00 to 19:30. If
You are misinterpreting what is going on.
The rbind command includes c(char, char, int) which produces a
character vector of length 3.
This is what you are rbind-ing which changes the type of the RT column.
If you do rbind(df, data.frame(P="in", ANSWER="V>N",
RT=round(runif(1,7000,16000),0)))
you
Hi Sigbert,
I have never used the aplpack package but out of curiosity I tried it out.
Doing a scatter plot of your (x,y) data shows that there are many repeated
x values, and this seems to be the source of the error.
There are no repeated y values. It seems that the bagplot() function does
not han
[re-sending as plain text]
Hi Sigbert,
I have never used the aplpack package but out of curiosity I tried it out.
Doing a scatter plot of your (x,y) data shows that there are many
repeated x values, and this seems to be the source of the error.
There are no repeated y values. It seems that the bag
Hi Andrew,
If you look at ?source you see its default value for encoding is
picked up from getOption("encoding"). Couldn't you just set this
option in your Rprofile?
HTH,
Eric
On Wed, Sep 21, 2022 at 5:34 PM Andrew Hart via R-help
wrote:
>
> Hi there. I'm working with some utf-8 incoded csv fil
In R 4.2.0 there is a significant change. When you use an if() statement
with a condition of length > 1 this now reports an error.
e.g. this link mentions it as a change
https://www.jumpingrivers.com/blog/new-features-r420/
In your case this is because class(obj) can return a character vector of
l
Does this help?
https://stackoverflow.com/questions/72138987/r-studio-fatal-error-r-tempdircontains-space
On Thu, Sep 22, 2022 at 10:37 AM Kaitlyn Light wrote:
> Hello!
> I recently downloaded R and RStudio to my windows laptop. I downloaded the
> correct version and made sure it was for windows
?ga states that ga() searches for the maximum of the fitness function.
The maximum of your fitness function is at x=0.
On Sun, Sep 25, 2022 at 4:52 AM Bert Gunter wrote:
> We aren't supposed to do homework on this list.
>
> Bert Gunter
>
> On Sat, Sep 24, 2022 at 5:29 PM Barry King via R-help
Bert provided an excellent answer to your question.
FYI here is a different approach to do the calculation.
It uses data.frame rather than matrix. A data frame is a list of its columns.
Here the function supplied to sapply operates on each column of the data.frame.
> m <- as.data.frame(t(matrix(1:
so
> much for the help!!
>
> Best,
> Kaitlyn Light
>
> On Thu, Sep 22, 2022 at 3:42 AM Eric Berger wrote:
>>
>> Does this help?
>> https://stackoverflow.com/questions/72138987/r-studio-fatal-error-r-tempdircontains-space
>>
>> On Thu, Sep 22, 2022
Alternatively
correct.year <- floor(time(x)+1e-6)
On Sat, Oct 15, 2022 at 10:26 AM Andreï V. Kostyrka <
andrei.kosty...@gmail.com> wrote:
> Dear all,
>
>
>
> I was using stats::time to obtain the year as a floor of it, and
> encountered a problem: due to a rounding error (most likely due to its
Also, since your examples were dplyr and dbplyr which are associated
with RStudio.com (aka Posit) you might also try
https://community.rstudio.com
You can apply filters on that site to narrow the results
On Wed, Oct 26, 2022 at 10:12 PM Jeff Newmiller
wrote:
>
> The general recommendation is
You may want to change the color of the vertex labels. e.g.
plot(g, vertex.size = 20, vertex.label.dist = 0.5,
vertex.color = V(g)$color, vertex.label.color="cyan")
On Thu, Oct 27, 2022 at 1:52 AM Jeff Reichman wrote:
>
> Yes Rui that will work for my needs thank you
>
> -Original Mes
You can see all the installed vignettes on your system with
`browseVignettes()`. (This opens a browser page.)
Alternatively `browseVignettes("pkgname")` for those related to a single
package.
HTH,
Eric
On Mon, Oct 31, 2022 at 11:37 AM Richard O'Keefe wrote:
> Let's put some numbers on that.
>
Hi Tiffany,
Here is some code that might help with your problem. I solve a "toy"
problem that is conceptually the same.
Part 1 sets up my toy problem. You would have to replace Part 1 with
your real case. The main point is to define
a function f(i, j, data) which returns 0 or 1 depending on whether
e(j=Var1,k=Var2) |> filter(j < k)
u <- sapply(1:nrow(idx),
\(i){ j <- idx$j[i]; k <- idx$k[i]; A[j,k] <<- f(j,k,myData) })
B <- A + t(A) + diag(N)
C <- diag(myData$Conc)
D <- B %*% C
D[D==0] <- NA
myData$Conc_min <- apply(D,MAR=1,\(v){min(v,na.rm=TRUE)})
print
on all points to get a list of minimum Conv
> values for all points, and merge back to pts.
>
>
> # Now apply this function to all points in pts
> Conc_min <- lapply(pts$X, function(i){
>MinConc(i, dist_matrix[i], pts)
> })
> Conc_min <- data.frame("Conc_min&
onc_min <- lapply(pts$X, function(i){
>MinConc(i, dist_matrix[i], pts)
> #})
> Conc_min <- data.frame("Conc_min" = as.integer(Conc_min))
>
> # Add back as new attrib to original points sf object
> pts_with_min <- do.call(cbind, c(pts, Conc_min))
>
>
>
>
Hi Sacha,
My search turned up the Causal Discovery Toolbox which includes IGCI among
10 (or more) methods.
This site includes both Python and R resources and seems to be quite rich -
hopefully you will find something useful.
Here's the link:
https://fentechsolutions.github.io/CausalDiscoveryToolbox
Hi Abdullah,
The Tidyverse is a set of R packages that are designed to work well
together for handling a variety of common tasks in data science. Many of
these packages are written by Hadley Wickham, chief scientist at
RStudio.com.
https://en.wikipedia.org/wiki/Hadley_Wickham
RStudio.com is a com
maybe this will make it clear
x <- c(a=1, b=5)
is.na(x) <- "b"
i.e. your second case is dealing with a named vector
HTH,
Eric
On Fri, Dec 16, 2022 at 8:29 PM Göran Broström
wrote:
> I'm confused:
>
> > x <- 1:2
> > is.na(x) <- 1
> > x
> [1] NA 2
>
> OK, but
>
> > x <- c("A", "B")
> > is.na(
Hi Boris,
I think these are good questions.
Some initial reactions:
1. with better tools available to the students, you can cover more material
at a faster pace 🙂
2. For years, it has been possible for students to find "answers" online
(e.g. Google search). Most programmers would regard this as an
Your problem is that the color "#4DAF4A8" is not a valid color. It should
have only 6 hex digits.
e.g. "#4DAF4A" will work.
Also you seem to be confused about ggplot. You are not using ggplot in your
code at all.
You are using base graphics. You can remove the 3 library calls.
HTH,
Eric
On Mon,
No code or data came through.
Please read the posting guidelines.
On Wed, Jan 11, 2023 at 1:38 PM Upananda Pani wrote:
>
> Dear All,
>
> I am using roptest function of package "ROptEst" (Kohl and Ruckdeschel
> (2019)) to find out the ML, CvM-MD, and the RMX estimator and their
> asymptotic conf
Google using "R package subway map"
produced
https://www.r-bloggers.com/2021/01/non-hierarchical-edge-bundling-flow-maps-and-metro-maps-in-r/
which looks promising
On Wed, Jan 11, 2023 at 2:48 PM Nick Wray wrote:
>
> Hello I'd like to create a simple topological map of a river system, ie all
> t
mydata[, -grep("^yr",colnames(mydata))]
On Sat, Jan 14, 2023 at 8:57 AM Steven T. Yen wrote:
> I have a data frame containing variables "yr3",...,"yr28".
>
> How do I remove them with a wild cardsomething similar to "del yr*"
> in Windows/doc? Thank you.
>
> > colnames(mydata)
>[1] "yea
How about just 'EVENT > 30 sec' or 'EVENT > 29 sec' ?
On Mon, Jan 16, 2023 at 10:19 AM Dennis Fisher wrote:
> R 4.2.2
> OS X
>
> Colleagues
>
> A file that I have read includes strings like this:
> "EVENT ≥ 30 sec"
> When I include the string in a graphic using:
> mtext(STRING,
Hi Upananda,
A few comments:
1. As you know, CRAN has thousands of packages. One of the ways to
learn about the packages you might care about is to use the CRAN
views. A 'view' is an attempt to provide some information on a certain
subset of the packages related to a particular area.
See a list of
You don't specify what platform you are on (linux / Windows / other),
and what tools you are using.
I am running a linux system and I have virtual environments set up.
I set the environment variable RETICULATE_PYTHON to point to python
(in my virtual environment).
I am using RStudio, and I use the
Detpack or detpack?
What happens when you try detpack::chi2testuniform(...) ?
On Wed, Feb 1, 2023 at 6:08 PM Nick Wray wrote:
> Hello I've successfully installed the package "Detpack" and remembered to
> call it via library() But when I try to use the functions i get this:
>
>
> chi2testuni
pivot_longer()
Sent from my iPhone
> On 3 Apr 2023, at 18:09, Sparks, John wrote:
>
> Hi R-Helpers,
>
> Sorry to bother you, but I have a simple task that I can't figure out how to
> do.
>
> For example, I have some names in two columns
>
> NamesWide<-data.frame(Name1=c("Tom","Dick"),Name2
One possibility might be to use Rcpp.
An R matrix is stored in contiguous memory, which can be considered as a
vector.
Define a C++ function which operates on a vector in place, as in the
following:
library(Rcpp)
cppFunction(
'void subtractConst(NumericVector x, double c) {
for ( int i = 0; i
lubridate::dmy("12 APR 2023")
On Wed, Apr 12, 2023 at 5:34 PM akshay kulkarni
wrote:
> dear members,
> I want to convert "12 APR 2023" into a Date
> object. I tried as_Date() from lubridate, but it is not working:
>
> > as_date("12 APR 2023")
> [1] NA
> Warning messa
This seems to do the job but there are probably more elegant solutions:
f <- function(s) { sub("^ ","",unlist(strsplit(gsub("\\+ ","+@ ",s),"@"))) }
g <- function(s) { sub("^ ","",unlist(strsplit(gsub("- ","-@ ",s),"@"))) }
h <- function(s) { g(f(s)) }
To try it out:
s <- “leucocyten + gramnegati
You first have to load the package using the library command.
> library(caret)
Then you can call createDataPartition. e.g.
> data(oil)
> createDataPartition(oilType,2)
HTH,
Eric
On Fri, Apr 14, 2023 at 7:52 AM Gábor Malomsoki
wrote:
> Dear all,
> When i try to use createDataPartition after ca
king.
> I saw a similar question in Stackoverflow, advising install package Rcpp,
> but this one i am unable to install.
>
> Eric Berger schrieb am Fr., 14. Apr. 2023, 08:47:
>
>> You first have to load the package using the library command.
>> > library(caret)
>
Malomsoki
wrote:
> Or is there any similar function to split the dataframe to trainDF and
> testDF?
>
> Gábor Malomsoki schrieb am Fr., 14. Apr. 2023,
> 09:45:
>
>>
>> This is the error then:
>> error in prettyseq(1:ncol(out)) : could not find function "prett
What happens with the command
> library(RBGL)
On Sat, Apr 22, 2023 at 7:08 PM varin sacha via R-help
wrote:
> Dear R-experts,
>
> How to solve that problem?
>
> My R version is 4.2.1
>
> Here below trying to install RGBL library found here :
> https://bioconductor.org/packages/release/bioc/htm
, table,
> tapply, union, unique, unsplit, which.max,
> which.min
>
>
> Attaching package: ‘graph’
>
> The following objects are masked from ‘package:igraph’:
>
> degree, edges, intersection
>
>
> Attaching package: ‘RBGL’
>
> The following objects are ma
Hi Drake,
Petr's suggestion to use the merge() function is good.
Another (possibly overkill) approach is to use functions from the dplyr
package, which is a fantastic package to get familiar with.
For example, the last alternative that Petr suggests is an example of what
is called a "left join" (me
df$ClaimManagerID[ !(df$ClaimManagerID %in% c(1565,1569,1674,415,1564))] <-
0
On Thu, Apr 18, 2019 at 3:39 PM Bill Poling wrote:
> Good morning.
>
> #RStudio Version 1.1.456
> sessionInfo()
> #R version 3.5.3 (2019-03-11)
> #Platform: x86_64-w64-mingw32/x64 (64-bit)
> #Running under: Windows >=
You seem to have a typo.
In the case that works your filename is "Mailles_2011a.dbf"
but in the case that fails your filename is "Mailles_2011a.shp"
(different extensions)
HTH,
Eric
On Sat, Apr 20, 2019 at 8:00 PM Patrick Giraudoux <
patrick.giraud...@univ-fcomte.fr> wrote:
> Dear listers,
>
>
Hi Mariano,
The problem appears to be that samples[[sn]] has zero length (or is NULL).
Consider the following code which gives the same error message.
x <- 1:10
x[1:5] <- as.numeric(NULL)
Error in x[1:5] <- as.numeric(NULL) : replacement has length zero
HTH,
Eric
On Fri, May 3, 2019 at 4:32 PM M
?sink
for the HELP page on that sink() function.
Check the description of the (optional) argument append to get an answer to
your question.
On Mon, May 6, 2019 at 5:24 AM John wrote:
> I use the functions "sink" and "print" to print the results to a txt file.
> May I delete everything in the tx
I don't think I understand your question.
What if you enter
class(anno)
Does that give anything?
On Mon, May 6, 2019 at 2:29 AM David Winsemius
wrote:
> I wouldn’t have expected an message, but it does raise the question: why
> are you making two different copies of the same text file if you
Do a web search such as "ubuntu install fortran" (or replace ubuntu by
your distribution if it's different, e.g. debian or centos or ..)
e.g. the above search gives a result of the following link which provides
the appropriate commands
https://fossnaija.com/how-to-install-fortran-compiler-in-linu
Hi Christofer,
You have a number of misunderstandings.
The first thing you could have tried in order to figure out what was going
on was to remove the 'silent=TRUE' from the call to try().
This would then give you extra information, specifically that there was a
timeout. The exact message that gets
Hi Nevil,
Here's one way to do it. (No doubt some regular-expression-gurus will have
more concise ways to get the job done.)
a1 <- sub(".*\\(","\\(",mystrings)
a2 <- sub("\\).*","\\)",a1)
a2[grep("\\(",a2,invert=TRUE)] <- ""
a2
HTH,
Eric
On Wed, Jun 12, 2019 at 8:46 AM nevil amos wrote:
> H
Is this supposed to be a reprex? I don't see where train_tbl is defined.
On Fri, Jun 14, 2019 at 10:30 PM Bill Poling wrote:
> #RStudio Version 1.2.1335
> sessionInfo()
> #R version 3.5.3 (2019-03-11)
> #Platform: x86_64-w64-mingw32/x64 (64-bit)
> #Running under: Windows >= 8 x64 (build 9200)
>
looking for split to be 3 months from the end of current time
> period. etc depends on our date period
>
> train_tbl <- dftmp %>%
> filter(Date2 < ymd(train_test_split_date))
>
> test_tbl <- dftmp %>%
> filter(Date2 >= ymd(train_test_split_date))
>
&g
Very nice, Peter.
Here is one version of Peter's suggestion expressed in R code
M <- M | t(M) # first step as symmetric matrix as stated by OP
Q <- M
for ( i in 2:(ncol(Q)-1) )
Q <- Q + Q %*% M
R <- (Q > 0)
R
HTH,
Eric
On Tue, Jun 18, 2019 at 12:46 PM peter dalgaard wrote:
> Sounds like
That's what my code does.
On Tue, Jun 18, 2019 at 4:27 PM Jeff Newmiller
wrote:
> Assuming Peter's equation applies, I think a direct for loop with
> multiplication would be a more efficient way to obtain this answer than
> repeated use of a power operator.
>
> On June 18, 2019 8:01:09 AM CDT, M
Hi Siti,
I didn't test Bert's code but I assume it's fine. :-)
I would take a different approach than Bert. I prefer to use a package such
as lubridate to handle the date wrangling, and a package such as dplyr to
handle the grouping and max extraction.
It may be overkill for this problem, but these
Hi Shreepad,
>From the command 'summary(PL2.rasch)' it seems that PL2.rasch is an object.
You don't provide enough details on how this object was created.
What python or R packages? And what functions from those packages were used?
Ideally you would provide a reproducible example, but even without
thing. I do not know
> which of us -- if either -- has interpreted her query correctly.
>
> Cheers,
> Bert
>
> On Wed, Jun 19, 2019 at 2:35 AM Eric Berger wrote:
>
>> Hi Siti,
>> I didn't test Bert's code but I assume it's fine. :-)
>> I would
2010-05-06 0.998
10 2010-05-07 2010-05-20 0.761
# ... with 69 more rows
On Wed, Jun 19, 2019 at 5:08 PM Eric Berger wrote:
> Hi Bert,
> I agree that our interpretation is slightly different, which is why I
> wrote:
> "If one can take the actual week of the year as an acceptable
282000-01-15 2000-01-09
>
> and then use:
>
> > aggregate(O3_Conc ~ TimeStartDays, data = DF, max)
> TimeStartDays O3_Conc
> 12000-01-01 0.068
> 22000-01-15 0.042
>
> > aggregate(O3_Conc ~ TimeStartWks, data = DF, max)
> TimeStartWks O3_Con
Hi Phil,
Try this
library(tidyverse)
# Test data
dta <- data.frame(dta_names=c("Series 1","Series 2","Series 3","Series 4"),
dta_values=c(0.5,1.3,-0.7,0.2))
dta$dta_names <- as.character(dta$dta_names) # convert from factor
*dta$labelColor <- c("black","red","black","black")*
# Bar chart
ggplot(
RStudio has a panel with a tab 'History' (that panel also has tabs
'Environment' and 'Connections').
If you click on the 'History' tab and can see your relevant history, you
can then highlight commands of interest and click the 'To Console' button.
This copies the highlighted commands to the consol
Hi Janet,
I am not sure what your problem is. It seems that the code you wrote is
doing what you want.
The command 'head(tmp2$X1)' is outputting a numeric vector, not a list.
Eric
On Sat, Jun 29, 2019 at 9:28 PM Janet Choate wrote:
> Hi,
> I have a data frame that looks something like this (bu
Nothing came through. Note that this is a plain text list and content that
is not plain text may be stripped off (or mangled).
On Sat, Jun 29, 2019 at 10:14 PM Don or Charlotte Smith
wrote:
>
>
> Sent from my iPhone
>
> __
> R-help@r-project.org mailin
Hi Sebastien,
Your 'within' command returns a dataframe. So without changing the call to
within you have some options such as:
df2 <- within(df, {b<-a*2; c<-b*3})
df2[c("a","b","c")]
OR
within(df, {b<-a*2; c<-b*3})[c("a","b","c")]
OR
within(df, {b<-a*2; c<-b*3})[c(1,3,2)]
HTH,
Eric
On We
Nice suggestion, Richard.
On Wed, Jul 3, 2019 at 4:28 PM Richard O'Keefe wrote:
> Why not set all the new columns to dummy values to get the order you
> want and then set them to their final values in the order that works
> for that?
>
>
> On Thu, 4 Jul 2019 at 00:12, Kevin Thorpe
> wrote:
>
>
# create some test data
df <- data.frame( id=101:105, author_id=25:21, parent_id=c(NA,NA,101,NA,NA)
)
df$parent_author_id <- sapply(1:nrow(df),
function(i) { if( !is.na(df$parent_id[i]) ) { j <-
match(df$parent_id[i],df$id); df$author_id[j] } else NA } )
df
# id author_id parent_
Change the definition of de to
de <- data.frame(d,e,stringsAsFactors=FALSE)
Then you should be ok.
Some additional remarks:
1. The ifelse() command is a bit tricky in R. Avoiding it is often a good
policy.
2. I find %in% very useful. You could replace the multiple conditions check
de$d=="-
Well, for example
> "a" + 2
Error in "a" + 2 : non-numeric argument to binary operator
On Wed, Jul 10, 2019 at 2:36 PM Tolulope Adeagbo
wrote:
> Dear All,
>
> Please what could be the cause of this error, I created a GUI with shiny R
> and it throws this error.
> But running it alone in R, it
For example, can you predict what the following code will do?
> a <- 1:5
> b <- c(2,3)
> ifelse( a < 3, 1, b)
On Wed, Jul 10, 2019 at 4:34 PM José María Mateos
wrote:
> On Wed, Jul 10, 2019, at 04:39, Eric Berger wrote:
> > 1. The ifelse() command is a bit tricky i
o
be a single number, either 1 or 2 (unless you know the "shape" of a).
I've been burned by such issues.
On Wed, Jul 10, 2019 at 4:42 PM Eric Berger wrote:
> For example, can you predict what the following code will do?
> > a <- 1:5
> > b <- c(2,3)
> >
y tricky thing I see is that R has
> a strict vectorised ifelse(logical.vector, some.vector, another.vector)
> AND
> a non-strict non-vectorised if (logical.scalar) some.value else
> another.value
> AND
> a statement form if (logical.scalar) stmt.1; else stmt.2;
>
>
> On Thu, 11 J
tempDat.long <- gather(data=tempDat, key=month, value=temp, "Jan",
"Feb","Mar", "Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") %>%
dplyr::mutate( monthIndex=match(month,month.abb))
%>%
dplyr::arrange( Year, monthIndex) %>%
Assuming you have the vector of .xlsx file names as oldFilenames
then
newname <- function(oldname) {
yr <- substr(oldname,7,10)
m <- as.numeric(substr(oldname,11,12))
mo <- as.integer( m/3 + 1 - 0.1 )
i <- c(3,1,2)[ m%%3 + 1 ]
sprintf("Domain%s-%d-%d.txt",yr,mo,i)
}
for ( s in oldFi
Hi Richard,
Nice comment on how authors use examples to show *how* to use a particular
method, not necessarily *when* to use a particular method (or which method
to use).
Good to keep in mind.
Thanks for sharing.
On Sun, Jul 28, 2019 at 11:30 AM Michael Dewey
wrote:
> Hay una lista en castellan
Hi Anuj,
I am providing comments regarding your first attempt to call mapply.
Since you are working with named arguments, you shouldn't need to include
the NULLs in the call.
Also you have provided the argument MoreArgs twice, which is what is
causing the Error message.
You can replace that call wi
oreArgs=list("theme=ct"))
> mapply (chart_Series, mget(symVec), name=infoVec,
> MoreArgs=list(quote("pars=cp"),quote("theme=ct")))
> mapply (chart_Series, mget(symVec), name=infoVec,
> MoreArgs=list(quote("theme=ct")))
>
> On Sun, Jul 28, 20
You may have a typo/misstatement in your question.
You define a data frame with 5 columns, each of which has 10 elements, so
your data frame has dimensions 10 x 5.
Then you request a new COLUMN which will have only 5 elements, which is not
allowed. All columns of a data frame
must have the same len
=c("C","A","D","D","B","A",NA,NA,"A","B"),
> eye_problemsdisorders_f6148_0_4=c("D","D",NA,"B","A","C",NA,"C","A","B"),
> eye_problem
Read the help for apply and %in%
?apply
?%in%
Sent from my iPhone
> On 29 Jul 2019, at 22:23, Ana Marija wrote:
>
> Thank you so much! Just to confirm here MARGIN=1 indicates that "A" should
> appear at least once per row?
>
>> On Mon, Jul 29, 2019 at 1:53 PM
Hi Ahson,
Many people use R via RStudio, an IDE that has both free and non-free
versions.
RStudio has invested a lot of effort into making it easier to establish
connections to databases.
If this sounds of interest to you, take a look at
https://db.rstudio.com/
HTH,
Eric
On Mon, Aug 5, 2019 at 2
Hi Sigbert,
Just leave out the '=...', as in
sliderTextInput('myinput', choices=list("choice1", "choice2", "choice3") )
HTH,
Eric
On Tue, Aug 6, 2019 at 10:52 AM Sigbert Klinke
wrote:
> Hi,
>
> I'am using
>
> sliderTextInput('myinput', choices=list("choice1"=1, "choice2"=2,
> "choice3"=3))
301 - 400 of 554 matches
Mail list logo