Most computer code will take a pile of numbers and return a pile of numbers.
Reading the documentation should help you figure out where each measure is
appropriate. It all depends on the purpose of a specific method and its
assumptions and how those relate to your data, application, and model
a
ity. For very large files, though, having multiple
> variations in memory at once may be an issue, especially if they are
> not removed and further processing and analysis continues.
>
> Perhaps it might be sensible to contact those maintaining the data and
> point out the anomaly
an be used without anomalies.
Avi
-Original Message-
From: R-help On Behalf Of Ebert,Timothy Aaron
Sent: Friday, September 30, 2022 7:27 AM
To: Richard O'Keefe ; Nick Wray
Cc: r-help@r-project.org
Subject: Re: [R] Reading very large text files into R
Hi Nick,
Can you post one line
Hi Nick,
Can you post one line of data with 15 entries followed by the next line of
data with 16 entries?
Tim
-Original Message-
From: R-help On Behalf Of Richard O'Keefe
Sent: Friday, September 30, 2022 12:08 AM
To: Nick Wray
Cc: r-help@r-project.org
Subject: Re: [R] Reading very
Learning R takes an hour. Find an hourglass, flip it over. Meanwhile we will
start increasing the size of the upper chamber and adding more sand.
Mastery of R is an asymptotic function of time.
While such answers might indicate trying for mastery is futile, you can learn
enough R to be very u
It depends on what you mean by learn, and the final goal. It also depends on
your starting point. "Computer literacy" is poorly defined. Finally, it depends
on the quality of instruction, your innate ability to learn this skill, and the
time you can devote to this task. You will be able to write
Hi Jada,
Just so you know:
I tried the link, but my system responded that it would not find that page.
I got a note in the email that the HTML version was deleted. (That is expected
given guidelines for posting)
Tim
-Original Message-
From: R-help On Behalf Of Jada Daniels
Sent: Sunday,
Yes, but if you want to learn R (or relearn R) it would be better for you to
decompress the code.
You know what b looks like so add the next step. If you want to be able to see
the original then save the output to another data frame.
New_df <- b %>%
mutate(Dtime = paste(Sys.Date(), Dtime),
This post was empty.
Tim
From: R-help On Behalf Of javad bayat
Sent: Wednesday, September 21, 2022 2:09 AM
To: R-help@r-project.org
Subject: [R] Write text file in Fortran format
[[alternative HTML version deleted]]
__
R-help@r-project.org
Have you done something like this first?
install.packages("chron")
After that comes
library(chron)
and the rest of your code.
Tim
-Original Message-
From: R-help On Behalf Of Bert Gunter
Sent: Tuesday, September 20, 2022 11:57 AM
To: Parkhurst, David
Cc: r-help@r-project.org
Subject:
s and the
numeric value to the numeric variable.
Keeping in mind that a vector can only be of one class will save you many
debugging hours later on.
Tim
-Original Message-
From: Sarah Goslee
Sent: Tuesday, September 20, 2022 9:02 AM
To: tibor.k...@rub.de
Cc: Ebert,Timothy Aaron ; r-help@r-p
David,
Do these work for you? (I am resending this so others can see. The original
only went to you.)
library(lubridate)
a<-c(4, 5, 6)
b<-c("18:00", "18:01", "18:02")
c<-as.data.frame(cbind(a,b))
c$d<-hm(c$b)
c$d$minute[2]
I could do it manually like this (where FrHour is fractional hour)
a<-
to your original df and finds that it must add a
character to a numeric vector. To keep the vector of all the same class it
converts everything to character.
Better?
Tim
From: tibor.k...@rub.de
Sent: Monday, September 19, 2022 8:07 AM
To: Ebert,Timothy Aaron
Cc: r-help@r-project.org
Subject: Re:
My version of this email has a bunch of ? that I do not know how to interpret.
Emails to this group need to be in plain text. HTML content 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
In your example code, the variable remains a class factor, and all entries are
valid. The variables will behave as expected given the factor levels in the
original dataframe.
(At least on my system R 4.2, in RStudio, in Windows) R returns a couple of
error messages warning me that I was bad.
Wh
Can you tell us why you want to do this? Is there something special about 09098
versus 9098 or 009098? In any mathematical operation these are all the same
number.
Tim
From: akshay kulkarni
Sent: Sunday, September 11, 2022 2:58 PM
To: Ebert,Timothy Aaron ; R help Mailing list
Subject
It is a bad graphic as the legend that should explain the color coding is
missing. The next option is to copy the data and code and see if you can
reproduce the figure. You can then play with the code and read a bit about the
procedures to figure out what is going on. It should not be too hard.
Do not learn a new software unless you must. I would find a copy of
"Geocomputation with R" and skim through it to see if it has figures or
chapter/section titles that would suggest that it can do all of the tasks I
need. If the answer looks even close to "yes" then I would go that route
becaus
I have a general dislike of "analysis emergencies." I would like to see a data
emergency wherein someone must cram 3 years of data collection into 18 months
so that they have time to work out the correct analysis. I am sure others would
suggest working out how analyze the data before starting th
=MinByCodeQ)
dat2<-arrange(dat2,as.numeric(RN))
-Original Message-
From: R-help On Behalf Of Ebert,Timothy Aaron
Sent: Thursday, August 25, 2022 8:18 AM
To: javad bayat ; Rui Barradas
Cc: R-help@r-project.org
Subject: Re: [R] Getting minimum value of a column according a factor column of
a dat
I missed where you explained how to choose a minimum value if there are several
values within a group that are equal to the minimum value. Here is a dplyr code
that returns eight values because there are ties for minimum values in Q.
library(dplyr)
library(magrittr)
dat2<-read.table(text="Code Y
library(dplyr)
library(magrittr)
dat2<-read.table(text="Code Y M D Q N O
41003 81 1 19 0.16 7.17 2.5
41003 77 9 22 0.197 6.8 2.2
41003 79 7 28 0.21 4.7 6.2
41005 79 8 17 0.21 5.5 7.2
41005 80 10 30 0.21 6.84 2.6
41005 80 12 20 0.21 6.84 2.4
41005 79 6 14 0.217 5.61 3.55
41009 79 2 21 0.218 5.56 4.0
im
-Original Message-
From: Bert Gunter
Sent: Monday, August 22, 2022 12:07 PM
To: Ebert,Timothy Aaron
Cc: Val ; r-help@R-project.org (r-help@r-project.org)
Subject: Re: [R] Correlate
[External Email]
... But of course the p-values are essentially meaningless without some sort of
multipl
I think what you want is full_join() from the dplyr package.
https://www.rdocumentation.org/packages/dplyr/versions/0.7.8/topics/join
The only requirement is that both data frames must have a column in common
wherein the data are entered in the same way. So the column labeled "state"
needs to ha
My understanding is that the only requirement is to give proper credit. This is
necessary anyway as readers would need to know what packages were used and what
version of R was used. In R there is the citation() function that returns the
approved citation. However, it might be useful to also inc
An alternative is the lubridate() package if you use tidyverse.
Check the data for daylight savings time. Twice per year Virginia changes time
where in the Fall clocks are shifted back an hour and in the Spring they jump
forwards an hour.
-Original Message-
From: R-help On Behalf Of Je
columns mean and what rhyme
or reasons decides which to keep or exclude. A more specific question may get a
more specific answer.
-Original Message-
From: R-help On Behalf Of Ebert,Timothy Aaron
Sent: Thursday, July 14, 2022 2:12 PM
To: Bert Gunter ; Ian McPhail
Cc: R-help
Subject: Re: [R
Maybe this is too simple but could you use the select() function from dplyr?
Tim
-Original Message-
From: R-help On Behalf Of Bert Gunter
Sent: Thursday, July 14, 2022 2:10 PM
To: Ian McPhail
Cc: R-help
Subject: Re: [R] mice: selecting small subset of variables to impute from
dataset w
The limits to the size of vectors, matrices, data frames, lists, or other data
structure does not have a simple answer.
1) 2^31 - 1 is the maximum number of rows.
https://stackoverflow.com/questions/5233769/practical-limits-of-r-data-frame#:~:text=The%20number%20is%202%5E31,start%20collecting%20
Would package versions help? It would allow you to install a specific version
of wmtsa into R 4.2.
Tim
-Original Message-
From: R-help On Behalf Of Muhammad Zubair Chishti
Sent: Saturday, July 2, 2022 12:39 PM
To: Spencer Graves ; r-help@r-project.org
Subject: Re: [R] A humble request
[
Jun 2022 at 23:00, Ebert,Timothy Aaron wrote: I
would try answering these questions:
1) What is the expected size?
2) Is the current size smaller or larger?
3) Every program running on your computer takes up memory. Given all the other
programs currently running, do you have space?
Maybe
Can one back transform confidence intervals: yes, just like one back transforms
other values.
Should one back transform confidence intervals: probably not. Even if you
applied the log transformation because it fixed problems in the model
residuals, it is possible (likely?) that the reason that t
Print(a\u2248b")
gives approximately equal sign.
-Original Message-
From: R-help On Behalf Of Ebert,Timothy Aaron
Sent: Thursday, June 23, 2022 6:48 AM
To: Helmut Schütz ; r-help@r-project.org
Subject: Re: [R] UTF-8 to the console
[External Email]
Wikipedia indicates that ther
I do not see how to do this with exclusively dplyr commands. I might be able to
make it work by including commands outside of dplyr, but at that point I would
use pivot_longer() from the tidyr package.
Tim
-Original Message-
From: R-help On Behalf Of Thomas Subia
Sent: Tuesday, June 21
Update RStudio through RStudio. In the "help" tab there is a choice "check for
updates." This approach will preserve all your files. I use
if(!require(package)){install.packages("package")}
So that I always install a package I need but only if it is not already
installed.
Tim
-Original Me
Hana, the "right" answer depends on exactly what you need. Here are three
correct solutions. They use the same basic strategy to give different results.
There are also other approaches in R to get the same outcome. You could use
data_catigocal[i,j] and some for loops.
size1 <-5
ngroup <- 1
t;,"name")
ID6 <-as.data.frame(ID_names2)
ID6$name<-colnames(ID6)
colnames(ID6)<-c("val","name")
IDall<-rbind(ID5,ID6)
Tim
-----Original Message-
From: anteneh asmare
Sent: Monday, June 13, 2022 4:49 PM
To: Ebert,Timothy Aaron
Cc: r-help@r-projec
"name","val") #rename columns to be consistent for all
dataframes.
ID6 <-as.data.frame(ID_names2)
ID6$name<-colnames(ID6)
colnames(ID6)<-c("name","val")
IDall<-rbind(ID5,ID6)
Tim
-----Original Message-
From: anteneh asmare
Sent: Monday,
You are welcome to ask here. However, you should try contacting the authors of
the gam package. Package authors are often extraordinarily helpful.
Tim
-Original Message-
From: R-help On Behalf Of jade.shodan--- via
R-help
Sent: Sunday, June 5, 2022 3:02 PM
To: r-help@r-project.org
Subje
I would calculate the difference and the CI about that difference. You would
not get the same thing by comparing the bootstrap CI of the group means.
One use for this is to determine if the confidence interval for the difference
in means includes zero. An alternative would be to use a more conven
I will suggest that if the bty='n' approach works that is a good solution. If
you have 50 graphs and they all have the same legend, then put the legend in a
common area outside the graphs or in graph 1 (and a comment in the legend or a
footnote.) I would be fine with the legend outside the graph
You could play with install.versions() from the versions package.
https://cran.r-project.org/web/packages/versions/README.html
I would try installing versions of both packages from the last time you got
them to work together.
Tim
-Original Message-
From: R-help On Behalf Of Jeff Newmi
Would you reconsider RStudio? If this is a person's first experience with a
computer or cell phone then RStudio is a bit much. Relative to using a browser,
MSWord, Excel, or many of the modern video games RStudio is simple. I have seen
beginning R courses start at the level of print("Hello World
Would lm, nls, or nlme work for what you need?
Tim
-Original Message-
From: R-help On Behalf Of Bernard Comcast
Sent: Sunday, May 22, 2022 3:01 PM
To: Bert Gunter
Cc: R-help@r-project.org
Subject: Re: [R] Suggestions as to how to proceed would be
appreciated...
[External E
A google search returned a stack overflow page that might help.
stackoverflow.com/questions/20177581/reading-an-asc-file-into-r
(add the https part to get a functional link.)
I would also try looking at the file using something like notebook, or any
program that is a plain text editor. That way I
It would be nice in some ways if everyone would pronounce the same word in the
same way, but then we could not argue over the correct pronunciation of words
like tomato or aluminium/aluminum. I think of cran as "Kran". While I had
German in high school I didnn't remember the German word for cran
One thought was that these were farm fields in satellite images. I just had no
clue why one would subdivide them. Maybe a training and testing portion of
these polygons? At a few dozen meters the curvature might be negligible on a
sufficiently large spheroid. If 45-55% split is approximate then
A <- matrix(1:9,ncol=3)
x <- c(0,1,0)
M <- matrix(ncol=3,nrow=3)
M<-A
for(i in 1:3) {
if(x[i]){
M[,i] <-0
}
}
}
M
The outcome you want is to set all of the middle column values to zero. So I
used x as a logical in an if test and when true everything in that column is
set to zero.
Y
1) Does it run perfectly with num_tirals_6 <- 100 ?
2) Rework the code to remove as much as possible from loops.
Renaming column names each time through the loop seems pointless.
Is the nested for loops converting the dice roll to person name
necessary within the while loo
https://en.wikipedia.org/wiki/ASCII
There is a table towards the end of the document. Some of the other pieces may
be of interest and/or relevant.
Tim
-Original Message-
From: R-help On Behalf Of Kristjan Kure
Sent: Wednesday, April 13, 2022 10:06 AM
To: r-help@r-project.org
Subject: [R
Cc: Ebert,Timothy Aaron ; r-help mailing list
Subject: Re: Error with text analysis data
[External Email]
Someone just told me that you need to pre process the data before model
construction. For instance, make the text to lower case, remove punctuation,
symbols etc and tokenize the text (give
I get an error with this:
my_subset_criteria <- c( F, F, T, NA, NA) my_subset_criteria
Tim
-Original Message-
From: R-help On Behalf Of Kelly Thompson
Sent: Wednesday, April 6, 2022 4:13 PM
To: r-help@r-project.org
Subject: [R] What is the intended behavior, when subsetting using bracke
way to address this is to characterize the distribution
of model outcomes from different runs with different random seeds. Examine that
characterization and hope for understanding.
Tim
From: Bert Gunter
Sent: Tuesday, March 22, 2022 2:03 PM
To: Ebert,Timothy Aaron
Cc: Neha gupta ; r-help@r
difference.
Random.org might be another place for the OP to explore.
Tim
-Original Message-
From: Bert Gunter
Sent: Tuesday, March 22, 2022 12:12 PM
To: Neha gupta
Cc: Ebert,Timothy Aaron ; r-help@r-project.org
Subject: Re: [R] How important is set.seed
[External Email]
OK, I'm somewhat
:03 PM
To: Ebert,Timothy Aaron
Cc: Jeff Newmiller ; r-help@r-project.org
Subject: Re: How important is set.seed
[External Email]
Thank you again Tim
d=readARFF("my data")
set.seed(123)
tr <- d[index, ]
ts <- d[-index, ]
ctrl <- trainControl(method = "repeatedc
If you are using the program for data analysis then set.seed() is not necessary
unless you are developing a reproducible example. In a standard analysis it is
mostly counter-productive because one should then ask if your presented results
are an artifact of a specific seed that you selected to g
You could try some of the "join" commands from dplyr.
https://dplyr.tidyverse.org/reference/mutate-joins.html
https://statisticsglobe.com/r-dplyr-join-inner-left-right-full-semi-anti
Regards,
Tim
-Original Message-
From: R-help On Behalf Of Jeff Newmiller
Sent: Thursday, March 10, 2022 1
;
> > >
> > > This can be copied into an R session and the data set recreated
> > > with
> > >
> > > data <- structure(etc)
> > >
> > >
> > > Now the boxplots.
> > >
> > > (Why would you want to plot a vec
You pipe the filter but do not save the result. A reproducible example might
help.
Tim
-Original Message-
From: R-help On Behalf Of Neha gupta
Sent: Thursday, February 17, 2022 1:55 PM
To: r-help mailing list
Subject: [R] Problem with data distribution
[External Email]
Hello everyone
In your prediction you will have a target level of accuracy. Something like "I
need to predict the slope of the regression to within 1%." You break your data
into a training and testing data sets, then for the testing data set you ask is
the prediction within 1% of the observed value. That is ab
How does “a value” differ from “an object?”
From: Richard O'Keefe
Sent: Friday, February 11, 2022 12:25 AM
To: Ebert,Timothy Aaron
Cc: Jeff Newmiller ; r-help@r-project.org; Erin
Hodgess
Subject: Re: [R] Convert a character string to variable names
[External Email]
You wrote "32
will keep that in mind. I agree that it makes
life much easier to enter the data in the way it will be analyzed.
-Original Message-
From: Jeff Newmiller
Sent: Tuesday, February 8, 2022 10:10 PM
To: r-help@r-project.org; Ebert,Timothy Aaron ; Richard O'Keefe
; Erin Hodgess
Cc: r-
Dat1 <- c(0.6, 0.5, 0.3, 0.2, 0.1, 0.1, 0.2)
print(order(Dat1))
print(sort(Dat1))
Compare output
-Original Message-
From: R-help On Behalf Of Martin Maechler
Sent: Monday, January 31, 2022 9:04 AM
To: Stefan Fleck
Cc: r-help@r-project.org
Subject: Re: [R] [External] Weird behaviour of
y, January 14, 2022 5:11 PM
To: Ebert,Timothy Aaron
Cc: Jim Lemon ; r-help mailing list
Subject: Re: [R] NAs are removed
[External Email]
I have a variable in dataset "CA", which has the following values:
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Hi Neha,
You used a variable named "fraction" so we took a guess. However, as another
pointed out 1/0 does not give NA in R. number/0 returns Inf except 0/0 which
returns NaN. So 1/0 <= 1 returns FALSE and 0/0 <= 1 returns NA. A great deal of
the behavior of your program hinges on what "fract
The simple solution for Windows is to use (windows icon) + shift + s. You then
select a portion of your screen and it gets copied to your clipboard. You can
then paste that into your document. Of course this will not work if it is
important that the reader is able to rotate the graphic.
Tim
--
101 - 166 of 166 matches
Mail list logo