Hi Thomas,
Perhaps this is what you are seeking:
my_read_excel<-function(filename) {
serials<-read_excel(filename,sheet="Flow Data",range=("c6"))
flow.data<-read_excel(filename,sheet="Flow Data",range=("c22:c70"))
dates<-read_excel(filename,sheet="Flow Data",range=("h14"))
return(data.frame(Se
We don't have your data file. Therefore your example is not yet reproducible.
If you read the references I provided you in my other email then you will find
hints and discussion about how to make your example reproducible without giving
out your actual data. The reprex package mentioned in refer
This is the whole code I provided except the libraries such as
library(caret)
library(randomForest)
data=read.csv("fault.csv")
inTraining <- createDataPartition(data$bug , p = .75,list = FALSE)
training <- data [inTraining, ]
testings <- data [-inTraining, ]
ctrol = trainControl(method = "repeat
A) Plain text is a setting that you must choose in many modern email clients.
Failing to do so tends to cause us to see something more or less different than
what you intended us to see.
B) Repeating your incomplete example is a more significant issue in this case.
If you supply a reproducible
The code is described below: I need to find the RMSE and MAE
///read data which have data types of integer and number.
data=read.csv("fault.csv")
inTraining <- createDataPartition(data$bug , p = .75,list = FALSE)
training <- data [inTraining, ]
testings <- data [-inTraining, ]
ctrol = trainContro
Per the posting guide, post your script and use plain text. There's no
way anyone can possibly help with only this information.
On Fri, Dec 20, 2019 at 5:33 PM Neha gupta wrote:
>
> When I run my code, I get the following error and suddenly the execution
> of the script stops. Where in my data
When I run my code, I get the following error and suddenly the execution
of the script stops. Where in my data is the problem?
Something is wrong; all the MAE metric values are missing:
RMSERsquaredMAE
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1s
I'm probably misunderstanding what you want. I get this from the code I sent:
VC
[[1]]
Prob.of.exceedance_1 Prob.of.exceedance_2 Prob.of.exceedance_3
100 0.005343027
Prob.of.exceedance_4
1 0.01947477
[[2]]
Prob.of.exceedance_1 Prob.of
Hi Ioanna,
We're getting somewhere, but there are four unique combinations of
Taxonomy and IM.type:
ER+ETR_H1,PGA
ER+ETR_H2,PGA
ER+ETR_H1,Sa
ER+ETR_H2,Sa
Perhaps you mean that ER+ETR_H1 only occurs with PGA and ER+ETR_H2
only occurs with Sa. I handled that by checking that there were any
rows th
Hi Bert,
Thank you for the elegant code example. I achieved my goal using lapply
function and do.call function together. Reduce function is nicer one and I am
looking into it.
Ding
From: Bert Gunter [mailto:bgunter.4...@gmail.com]
Sent: Friday, December 20, 2019 11:47 AM
To: Yuan Chun Ding
C
It is perhaps worth noting that (assuming I understand correctly) this can
easily be done in one go without any overt looping as a nice application of
Reduce() after all your files are read into your global environment as a
nice application of Reduce().
Example:
> a.out <- data.frame(x = 1:3, y1
?merge ## note the all.x option
Example:
> a <- data.frame(x = 1:3, y1 = 11:13)
> b <- data.frame(x = c(1,3), y2 = 21:22)
> merge(a,b, all.x = TRUE)
x y1 y2
1 1 11 21
2 2 12 NA
3 3 13 22
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things int
On 20/12/2019 11:24 a.m., Steven Yen wrote:
I had to use an older version of R (as old as R3.0.3) for a reason. I
myself have no problem installing a package built under a newer version,
but my student (who also installed R3.0.3) could not install the package
(newer version). Had an error message
Colleagues,
I am using readxl to extract a serial number and its associated data using the
following code.
library(readxl)
files <- list.files(pattern="*.xls", full.names = FALSE)
serials <- lapply(files, read_excel, sheet="Flow Data", range=("c6"))
flow.datum <- lapply(files, read_excel, sheet=
Hi Bert,
Sorry that I was in a hurry going home yesterday afternoon and just posted my
question and hoped to get some advice.
Here is what I got yesterday before going home.
---
setwd("C:/Awork/VNTR/GETXdata/GTEx_genotypes")
file_list
No.
You can install both versions side by side, use the newer version and
xx package as needed, use the older version and your essential package
as needed, and shift results in .Rdata files -- or even as text files of
data -- between them as necessary.
This is obviously a nightmare and may be
I had to use an older version of R (as old as R3.0.3) for a reason. I
myself have no problem installing a package built under a newer version,
but my student (who also installed R3.0.3) could not install the package
(newer version). Had an error message saying package x is not
available und
Hello Jim,
I made some changes to the code essentially I substitute each 4 lines DS1-4
with one. I estimate VC which in an ideal world should be a matrix with 4
columns one for every exceedance_probability_1-4 and 2 rowsfor each unique
combination of taxonomy and IM.Type. Coukd you please check
Hello Jim,
Thank you every so much it ws very helful. In fact what I want to calculate is
the following. My very last question is if I want to save the outcome VC,
IM.type and Taxonomy in a new data.frame how can I do it?
# names of the variables used in the calculations
calc_vars<-paste("Pro
Hi Ioanna,
For simplicity assume that the new data frame will be named E:
E<-D[,c("Taxonomy","IM.type",paste("VC,1:4,sep="_"))]
While I haven't tested this, I'm pretty sure I have it correct. Just
extract the columns you want from D and assign that to E.
Jim
On Fri, Dec 20, 2019 at 9:02 PM Ioan
Hello everyone,
Could you please let me know how to create a new data.frame with the output of
the 2 unique loops. Essentially i want a data.frame with the IM, Taxonomy and
VC . MInd you VC is a vector with 33 elements.
Any ideas?
best,
ioanna
D<- data.frame(Ref.No = c(1622, 1623, 1624, 1625,
21 matches
Mail list logo