https://www.r-bloggers.com/2021/06/reading-data-from-excel-files-xlsxlsxcsv-into-r-quick-guide/
Excel can hold a great quantity of data. However, I find that it is slow and
often crashes when I try to use Excel at large scale. It also grinds my entire
system to a halt. At the kb and mb scales I
You could have negative indices. There are two ways to do this.
1) provide a large offset.
Offset <- 30
for (i in -29 to 120) { print(df[i+Offset])}
2) use absolute values if all indices are negative.
for (i in -200 to -1) {print(df[abs(i)])}
Tim
-Original Message-
From: R-help On
Whatever you had as HTML was deleted. If that was data we did not get it.
1) manipulate wpi_def_nic2004 and wpi_def_nic2008 first so that the data are
compatible, then join them.
2) The full_join statement should explicitly state the columns to join by.
Using by=NULL joins by all the columns
g_data)
values<-as.integer(levels(mydf$string_data))
for (i in 1:length(values)) {
assign(paste("VAR_", i, sep=""), values[i]) }
--- snip ---
Best,
Kimmo
to, 2024-03-28 kello 14:17 +, Ebert,Timothy Aaron kirjoitti:
> Here are some pieces of working code.
Here are some pieces of working code. I assume you want the second one or the
third one that is functionally the same but all in one statement. I do not
understand why it is a factor, but I will assume that there is a current and
future reason for that. This means I cannot alter the string_data
You could declare a matrix much larger than you intend to use. This works with
a few megabytes of data. It is not very efficient, so scaling up may become a
problem.
m22 <- matrix(NA, 1:60, ncol=6)
It does not work to add a new column to the matrix, as in you get an error if
you try m22[ ,
Yea, that worked. Thank you. :)
From: jim holtman
Sent: Wednesday, February 28, 2024 12:52 PM
To: Ebert,Timothy Aaron
Cc: r-help@r-project.org
Subject: Re: [R] Trouble reading a UTF-16LE file
[External Email]
Try this:
> x <- file("C:\\Users\\Jim\\Downloads\\PV2-ch2 -
The earlier post had an attached text file that did not go through.
I hope this link works. I tested it with a coworker, but that is no guarantee.
https://uflorida-my.sharepoint.com/:u:/g/personal/tebert_ufl_edu/EXf5u_CtTwJCrhdfTBIPr7wBefZHx4P_suj4wAWb8i8HFA?e=iQawhh
Regards,
Tim
Dear R-help,
I am having trouble reading a UTF-16LE formatted file. The issue appears to
be a byte order mark at the beginning of the file. I have tried readLines(file,
encoding='utf-16LE') but that got me
[1]"\xff\xfe1" "" "" "" "" ""
This is a tab delimited text
Dear R-help,
I am having trouble reading a UTF-16LE formatted file. The issue appears to
be a byte order mark at the beginning of the file. I have tried readLines(file,
encoding='utf-16LE') but got me
[1]"\xff\xfe1" "" "" "" "" ""
Regards,
Tim
The data came through fine, the program was a miss. Can you paste the program
into a ".txt" document like a notepad file and send that? You could also paste
it into your email IF your email is configured to send text and NOT html.
TIm
-Original Message-
From: R-help On Behalf Of Pedro
Would something like this help?
library(ggplot2)
# Create a plot
p <- ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
labs(title = "Scatter Plot", x = "Weight", y = "Miles Per Gallon")
# Add text at a specific location
p + annotate("text", x = min(mtcars$wt) + 23, y = max(mtcars$mpg) -
It would help to have reproducible code. Use dummy data for confidentiality (if
you care about that).
My guess is that you set margins somewhere and never returned them to a default
value. The first thing I would try is to open a new window in RStudio, copy the
smallest piece of code that will
That depends on how exactly everything must match your primary question. The
ecology group might be helpful for how biodiversity changes with proximity to a
smokestack. They might have a better idea if the smokestack was from a coal
fired powerplant or oil refinery. The modeling process would
Change year to a factor. Doing it in ggplot will not change the original data.
ggplot(df, aes(x = as.factor(year), y = score)) + geom_point() +
geom_smooth(method = "lm", formula = y ~ x) + labs(title = "Standard linear
regression for France", x = "Year", y = "PISA score in mathematics") +
Look at the lubridate package in R.
Regards,
Tim
-Original Message-
From: R-help On Behalf Of Sorkin, John
Sent: Thursday, December 7, 2023 11:22 AM
To: r-help@r-project.org (r-help@r-project.org)
Subject: [R] Convert character date time to R date-time variable.
[External Email]
Would this work in general? Say I have a document with figures, special
equations, text, and tables. The text and tables are relatively easy. The
figures would need a conversion from pixels to lines, and the equations maybe
printed out, counted as a figure, and then added to the line count. It
Your solution was educational. Thank you. I have two comments.
1) If you do not provide both options then you are forcing people to conform to
your approach. In general I disapprove, but for specific cases I can see
advantages.
2) Without reading the relevant papers (and possibly understanding
The "problem" goes away if you use
x$C <- y[1,]
If you have another row in your x, say:
x <- data.frame(A=c(1,4), B=c(2,5), C=c(3,6))
then your code
x$C <- y[1]
returns an error.
If y has the same number of rows as x$C then R has the same outcome as in your
example.
It looks like your code
Is that a method where a program that I write today would still run without
changes in 10 years?
Tim
-Original Message-
From: R-help On Behalf Of Richard O'Keefe
Sent: Wednesday, October 11, 2023 8:08 AM
To: Uwe Ligges
Cc: r-help@r-project.org
Subject: Re: [R] Problem with compatible
I would answer "local files only," but with sufficient motive it is possible
for some people to abuse a system. Base R does not download any of your data.
The packages that I know about do not download data. You can add a layer of
protection by only downloading directly from the source rather
In this sort of post it would help if we knew the package that was being used
for the example. I found one option.
https://cran.r-project.org/web/packages/pivottabler/vignettes/v00-vignettes.html
There may be a way to create a custom data type that would be a date but
restricted to a -mm
uot;))]
or
vals <- c(BUY=1, SELL = -1)
vals[side]
On 2023-09-29 9:21 a.m., Ebert,Timothy Aaron wrote:
> Does this work?
> mynewdf$side <- as.numeric(mynewdf$side)
>
> This code would be the next line after your mutate.
>
> TIm
>
> -Original Message-
> From:
Does this work?
mynewdf$side <- as.numeric(mynewdf$side)
This code would be the next line after your mutate.
TIm
-Original Message-
From: R-help On Behalf Of Enrico Schumann
Sent: Thursday, September 28, 2023 3:13 AM
To: arnaud gaboury
Cc: r-help
Subject: Re: [R] replace character by
An update please:
Collectively we have suggested removing commas from the "E..coli" column,
checking for different forms of "NA", and looking outside the dataset for
e-trash (spaces, text, or other content). For removing commas, I would use
global replace to ensure that all commas were removed
I tend to keep data in Excel. The reason is that I can keep data and analysis
output in one file. A part of this is that I tend to use SAS where I get
abundant output.
One way that this type of result happens is with junk in the file. Someone
might put a space in a cell or a period. Such
Why insist on agricolae?
Here is an example using multcompiew
https://r-graph-gallery.com/84-tukey-test.html
You have the same question posted to stackoverflow.
https://stackoverflow.com/questions/77090467/graph-in-r-with-grouping-letters-from-the-tukey-lsd-duncan-test-with-agricolae
I searched
t the date (say Day). Group_by the day and apply a max
function to the grouped data. Then plot the result.
Tim
-Original Message-
From: Kevin Zembower
Sent: Wednesday, September 13, 2023 3:26 PM
To: Ebert,Timothy Aaron ; Richard O'Keefe
Cc: r-help@r-project.org
Subject: Re: [R] Help wit
larger cities (Duluth, International
Falls, Thunder Bay) and take a metal average. There is a lake effect for two of
these more than the other.
All good?
Tim
-Original Message-
From: Kevin Zembower
Sent: Wednesday, September 13, 2023 2:05 PM
To: Ebert,Timothy Aaron
: Wednesday, September 13, 2023 1:22 PM
To: Richard O'Keefe ; Ebert,Timothy Aaron
Cc: r-help@r-project.org
Subject: Re: [R] Help with plotting and date-times for climate data
[External Email]
Tim, Richard, y'all are reading too much into this. I believe that TMAX is the
high temperature of the day
+"turkey test +"mean comparison" 84 hits in google scholar.
There is an aphid "Aphis gossypii." Some people have changed this to "Apis
gossypii." "Apis" is a genus for bees, and there is no critter named "Apis
gossypii." However there are 45 papers in google scholar suffering from this
malady.
I had the same question.
However, I can partly answer the off-topic question. Min and max can be
important as lower and upper development thresholds. Below the min no growth or
development occur because reaction rates are too slow to enable such. Above
max, temperatures are too hot. Protein
Say I have one machine that produces 15 million widgets per day. Every day a
few widgets are defective. Is the proportion increasing?
The data analyst needs to know what time span is of interest. I assume that
there is some day-to-day variability. Is today's defect rate greater or less
than
The example is the example in the documentation for the method. There were no
details.
https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/prop.trend.test
More documentation would be useful. Answering questions like what are these
numbers?
As shown, I see a cluster of three
;, repeats = FALSE)
> > >> [1] "BCAE" "BDAE" "BEAE" "BABE" "BCBE" "BDBE" "BEBE" "BACE"
> > >> [9] "BDCE" "BECE" "BADE" "BCDE" "BEDE"
> > >
Does this work for you?
t0<-t1<-t2<-LETTERS[1:5]
al2<-expand.grid(t0, t1, t2)
al3<-paste(al2$Var1, al2$Var2, al2$Var3)
al4 <- gsub(" ", "", al3)
head(al3)
Tim
-Original Message-
From: R-help On Behalf Of Eric Berger
Sent: Monday, September 4, 2023 10:17 AM
To: Christofer Bogaso
Cc:
Add a break. Something like:
If (is.character(x)) break
If you have nested loops then a similar statement is needed for each level.
"break" only exits the innermost loop.
Tim
-Original Message-
From: R-help On Behalf Of Jeff Reichman
Sent: Wednesday, August 30, 2023 9:46 PM
To:
When I installed R no personally identifiable information was given, none was
requested. There is no login, so no password or user name. R resides on the
host computer, so security is the responsibility of the owner(s) of that
computer. There are packages and other third party programs, but
I have entered values into Excel, and sorted them. I am assuming you are asking
why the value 3 in x2 is ranked 4.5 versus in x5 it has a rank of 5.
X2 looks like this
Value RankOrder
1 1.5 1
1 1.5 2
2 3 3
3 4.5 4
3 4.5 5
4 6 6
You could use a for loop in a brute force approach.
-Original Message-
From: R-help On Behalf Of Rui Barradas
Sent: Sunday, August 6, 2023 7:37 PM
To: Iris Simmons ; Steven Yen
Cc: R-help Mailing List
Subject: Re: [R] Stacking matrix columns
[External Email]
Às 01:15 de 06/08/2023,
I did a google search for "R books" and looked at the R in the titles. There is
no consistency except it is always an upper case letter.
Serif, white R on red: "R for Data Science" and again "R Packages." Given a
common author this is a Hadley Wickham style.
Sans-serif, black R on cream and a
Lemon' ; Ebert,Timothy Aaron
Cc: 'R-help'
Subject: RE: [R] Off-topic: ChatGPT Code Interpreter
[External Email]
Jim,
I am not sure what your example means but text to image conversion can be done
quite easily in many programming environments and does not need an AI unless
you are using
This seems spot on, given that Paul Bernal just posted a request to fit all
possible models and compare them using r-squared. The all models approach does
not promote understanding about what your model is saying about the data and
how the system works. Nor does it facilitate fitting the
At least on my system string has a single value of " xxx1 xxx2" not "xxx1" and
"xxx2".
The variable zzz has two values: "J K xxx1" and "J K xxx2"
What you want is "J", "K", "xxx1", "xxx2"
If I cheat everything works. So then the goal is to rewrite the program so
cheating is not needed.
#
Reposting the data did not help. We do not like to guess, and doing so takes a
great deal of time that is likely wasted.
Rows are observations.
Columns are variables.
In Excel, the first row will be variable names and all subsequent rows will be
observations.
Income is the first variable. It
Another suggestion:
The statistics does not care where the numbers come from. The values 1, 2,
3 have a mean of 2 no matter if these are weights of a bird, plant heights, or
concrete tensile strength. Your interpretation might change, but the mean is
still 2.
Try synthetic data.
Start with defining your dependent variable and independent variable(s). As an
equation like y equals some function of x, the y is the dependent variable. It
is often continuous, but does not have to be.
If your continuous variable is the dependent variable and you have one
categorical
Reorganize the data so that you have three columns
Something more like this:
Date Country Value
2005-01-03 Crepub1.21
You ggplot statement has a mistake. The geom_line() should be outside the
ggplot() call.
You might then have a ggplot statement like
Are the numbers you provided multiple estimates of one coefficient or are they
one estimate each of over 20 coefficients?
-Original Message-
From: R-help On Behalf Of Michael Dewey
Sent: Wednesday, April 26, 2023 5:14 AM
To: bharat rawlley ; r-help@R-project.org
Subject: Re: [R] Error
Thank you for sharing the paper.
Tim
-Original Message-
From: R-help On Behalf Of Hadley Wickham
Sent: Tuesday, April 25, 2023 9:44 AM
To: Sigbert Klinke
Cc: r-help@r-project.org
Subject: Re: [R] diamonds data set from ggplot2
[External Email]
On Tue, Apr 25, 2023 at 4:09 AM Sigbert
1) If you do not need it do not plot it. However, also consider how others will
use your content. Might it be a trivial piece of information for you, but a
critical piece of information for someone trying to use your content. A meta
analysis, or just wanting to try to relate your outcomes to
Sometimes outliers happen. No matter the sample size there is always the
possibility that one or more values are correct though highly improbable.
-Original Message-
From: R-help On Behalf Of Richard O'Keefe
Sent: Friday, April 21, 2023 7:31 PM
To: AbouEl-Makarim Aboueissa
Cc: R
I searched for "caret AIC package r" and found this:
https://stats.stackexchange.com/questions/443286/r-interpreting-output-of-carettrain-with-method-glmstepaic
My guess (without having used it) is that this uses AIC in a stepwise model
building approach.
-Original Message-
From: R-help
Originally this post was to just look at execution times for different
approaches to solving this problem.
Now I have a question:
I change the code for calculating a1 from c(c1, c2) to data.frame(c(c1,c2)).
This changes the execution times of all the other variables. What am I missing?
Combined, the answers are close to an example in the documentation for
microbenchmark where they (in part) look at execution times for c() versus
append(). Here is the code, but c() has the shortest execution time in this
example. If I remove a3 and a4 then c() is significantly shorter than
IMHO The difference makes sense for paired samples. For unpaired samples it is
just the difference in means. I think presenting the means (and assuming the
audience can perform subtraction) conveys more information. The interpretation
of a difference of 5 might be influenced if I have means of
My first thought was pivot_longer, and stack() is new to me.
How about append(c1,c2) as another solution? Or data.frame(append(c1,c2)) if
you want that form.
Tim
-Original Message-
From: R-help On Behalf Of Marc Schwartz via
R-help
Sent: Monday, April 3, 2023 11:44 AM
To: Sparks,
If you are open to other options:
The null hypothesis is that there is no difference.
If I have two equations y=x and y=z and there is no difference then it would
not matter if an observation was from x or z.
Randomize the x and z observations. For each randomization calculate a
My guess: It I clear from the link that they can use the R logo for commercial
purposes. The issue is what to do about the "appropriate credit" and "link to
the license." How would I do that on a hoodie? Would they need a web address or
something?
-Original Message-
From: R-help On
IMO) The best approach is to develop a good understanding of the individual
processes that resulted in the observed values. The blend of those processes
then results in the distribution of the observed values. This is seldom done,
and often not possible to do. The alternatives depend on why you
ferent than Month 12.
Tim
From: Carolyn J Miller
Sent: Tuesday, January 31, 2023 9:30 AM
To: PIKAL Petr ; r-help@r-project.org; Ebert,Timothy
Aaron
Subject: Re: question
[External Email]
Hi Timothy,
Here's some example data that might help to demonstrate how the data currently
looks.
Anim
Can you please show us a small sample of your data? The first 5 or 10 lines
should be good enough.
Tim
-Original Message-
From: R-help On Behalf Of Carolyn J Miller via
R-help
Sent: Monday, January 30, 2023 1:16 PM
To: r-help@r-project.org
Subject: [R] question
[External Email]
Hi
Another option is to convert all times to base units or the sample rate from
the analog-to-digital converter. If this is 100 milliseconds then use
milliseconds rather than fractions of an hour or day. This approach might not
help if the range in values spans more than 16 digits: slightly finer
This is a poster child for why we like open source software. "I dump numbers
into a black box and get numbers out but I cannot verify how the numbers out
were calculated so they must be correct" approach to analysis does not really
work for me.
Tim
-Original Message-
From: R-help On
1) Your "dates" are not being processed as dates. They are strings.
2) As written your date "01-01" comes first because year is not specified and
January comes before December.
3) A library statement is missing. I tried running the program and
theme_cowplot() was not found.
As you are plotting
not
tidy up after each task.
If you wanted to test execution times for bits of code there is the
microbenchmark package.
Tim
-Original Message-
From: Sorkin, John
Sent: Tuesday, January 3, 2023 12:13 PM
To: Ebert,Timothy Aaron ; 'R-help Mailing List'
Subject: Re: Pipe operato
The pipe shortens code and results in fewer variables because you do not have
to save intermediate steps. Once you get used to the idea it is useful. Note
that there is also the |> pipe that is part of base R. As far as I know it does
the same thing as %>%, or at my level of programing I have
It would help students formulate a plan for coding. Successful students will be
able to give good directions that the AI can turn into good code. This skill is
essential no matter who writes the program.
In more advanced classes I might collect some data sets designed to cause the
AI problems.
A number of problems.
The variable names are not helpful. PointEstx is not a point it is a value. I
need an x and a y coordinate for a point.
row1 is not defined
While there is a function data.frame(), there is no data_frame(). Making this
change gives an error that row1 is not defined. I solved
I suggest starting with a browser (I used Google), and search for "Tidyverse".
Some pages there should help. I would check out the github link. Before going
too far I would also check out the Wikipedia page, and the references cited
therein. Using key words from these resources and using
1) Any HTML content you intended to share did not make it past the filters. All
I get is [[alternative HTML version deleted]
2) AIC is for comparing models where lower AIC indicates a better model, though
please see a statistics reference for additional details. No models were
presented.
3)
I like option 1. Option 2 may cause problems if you are pooling groups that do
not go together. This is especially a problem if you know that the data is
missing some groups. I would consider dropping rare groups - or compare results
between pooling and dropping options. If the answer is the
I would suggest treating initial values as hyperparameters. Try a range of
values to understand how your choice influences your outcome. Plot the result.
Eventually (I hope) you will get a feel for the right answer for your specific
type of data and you will be able to reduce the time needed
Hi George,
I did not get an attachment.
My first step would be to try simplifying things. Do all of these work?
fit_1=glm(Base[,2]~Base[,1],family=binomial(link="logit"))
fit_1=glm(Base[,2]~Base[,10],family=binomial(link="logit"))
fit_1=glm(Base[,2]~Base[,11],family=binomial(link="logit"))
Hi Erin,
Note that the HTML version was deleted in RHelp. Whatever was there was not
seen by anyone else.
Not sure this is what you want, but try "mixture designs in R" as a google
search. There are a number of options therein.
Regards,
Tim
-Original Message-
From: R-help On
Dear Akshay,
I think we have provided several solutions to the question asked. Can you
please adjust your question to more closely align with what you need. It would
be nice if you can provide sufficient detail so that we can see how you have
adapted our solutions and how these have not
Another option is use paste() within print()
lapply(TP,function(x){print(paste("x= ",x, " x^2 = ", x^2))})
Tim
-Original Message-
From: R-help On Behalf Of Andrew Simmons
Sent: Monday, November 7, 2022 12:21 PM
To: akshay kulkarni
Cc: R help Mailing list
Subject: Re: [R] print and
I appreciate this thread on coding. My preference for reading is to have
complete sentences.
I can read this:
{ if (x On Behalf Of Jorgen Harmse via
R-help
Sent: Friday, October 28, 2022 10:39 AM
To: r-help@r-project.org
Subject: Re: [R] unexpected 'else' in " else"
[External Email]
Richard
If you have three values, then it should be possible to fit any number of
distributions such that they could return those three values. On the other
hand, if you have billions of values and insist on a perfect fit then you may
have a unique distribution only identified by the data in hand. For
Message-
From: Martin Maechler
Sent: Friday, October 21, 2022 8:43 AM
To: Ebert,Timothy Aaron
Cc: Andrew Simmons ; Jinsong Zhao ; R-help
Mailing List
Subject: Re: [R] unexpected 'else' in " else"
[External Email]
>>>>> Ebert,Timothy Aaron
>>>>> o
I can get it to work with
ifelse(is.matrix(r), r[w!=0, , drop=FALSE], r[w!=0])
With w and r as defined r is not a matrix, so the first part will never
execute. The test is for w not equal to zero so it is always true for these
vectors. It is usually good to have test code such that all
While I agree that S.E. and S.D. are sometimes confused I disagree that the
definition and use must be rehashed in every package that uses either one. The
programmer (and documentation writer) makes tools available. If they do a good
job with documentation then it is more likely that the tool
2]).
In debugging or trouble shooting setting seed is useful. For actual data
analysis you should not set seed, or possibly better yet use set.seed(NULL).
Tim
-Original Message-
From: Ashim Kapoor
Sent: Thursday, October 13, 2022 12:28 AM
To: Ebert,Timothy Aaron
Cc: R Help
Subjec
Use absolute value
Tim
-Original Message-
From: R-help On Behalf Of Ashim Kapoor
Sent: Wednesday, October 12, 2022 7:48 AM
To: R Help
Subject: [R] prcomp - arbitrary direction of the returned principal components
[External Email]
Dear R experts,
>From ?prcomp,
snip -
Note:
Can you please provide us with a copy of the error msg? I have used ggplot2
with R 4.2.1, and probably R 4.2.0 in RStudio on Windows 11 and not had
trouble. You might need to update R, or RStudio. R and RStudio need to be
compatible versions.
Tim
-Original Message-
From: R-help On
Would an inner_join work? If not, please describe why so that we can improve
our answer. This answer requires the dplyr package.
https://statisticsglobe.com/r-dplyr-join-inner-left-right-full-semi-anti
Regards,
Tim
-Original Message-
From: R-help On Behalf Of PIKAL Petr
Sent: Friday,
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
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 of da
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
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
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:
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:
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-projec
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)
his 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
1 - 100 of 152 matches
Mail list logo