Hi i can't find where the error is
g1<-ggplot()+geom_bar(data=ventas2,aes(x=time,y=values,fill=mot_nrg),stat="identity",width=.6)+scale_fill_manual(breaks=c("DIE","PET"),values=c("#EB9486","#9ED8DB","blue"))+scale_y_continuous(breaks=brks,labels=lbls)+coord_flip()+labs(title="Engine Consumption")+theme(plot.title = element_text(hjust=.5)),axisTicks(element_blank())+geom_text(data=ventas2,aes(label=abs(values),x=time,y=values),fontface="bold")+geom_line(data=ventas2,aes(x=time,y=values,group=1,size=0.7,linetype="dashed")+geom_point(data=ventas2,aes(x=time,y=values),color="#2374AB",show.legend = FALSE)+theme(text=element_text(size=16,family="American Typewriter",face="bold"),plot.title = element_text(size=20,family="serif",hjust=0.5),legend.position = "bottom")
**Error: inesperado ',' in "lues,fill=mot_nrg),stat="identity",width=.6)+scale_fill_manual(breaks=c("DIE","PET"),values=c("#EB9486","#9ED8DB","blue"))+scale_y_continuous(breaks=brks,labels=lbls)+coord_flip()+labs(title=""**
please heelp
I think you are missing a parenthesis here:
geom_line(data=ventas2,aes(x=time,y=values,group=1,size=0.7,linetype="dashed")+
geom_line should have 2 ending parenthisis and I can see only one.
TIP: Press enter in every ending + sign in you RStudio and it will indent your code automathically ;)
Related
I don't know if you have already encountered this kind of problem with clusterProfiler, but it seems that it doesn't recognize the keytype I indicate.
Having GIDs, indicating keyType="GID" as an argument, I get this error:
> GOenrich <- enrichGO(gene=GenesVector,
+ OrgDb="org.Cgigas.eg.db",
+ keyType="GID",
+ ont="BP",
+ pAdjustMethod="BH",
+ qvalueCutoff="0.05",
+ universe=GenesBackground,
+ readable=FALSE,
+ pool=FALSE)
Error in testForValidKeytype(x, keytype) :
Invalid keytype: GOALL. Please use the keytypes method to see a listing of valid arguments.
When I display the list of possible arguments, I get the following result:
> keytypes(org.Cgigas.eg.db)
[1] "EVIDENCE" "GID" "GO"
However, the same error is displayed for keyType="GO" or keyType="EVIDENCE", even though these arguments are not relevant to my study.
If you are using clusterProfiler and have any advice, I am listening.
For precision: I generated my Org.db using the makeOrgPackage() function of AnnotationForge.
My code was working fine and when I tried to run it today without changing anything I got the following error:
TypeError: argmax(): argument 'input' (position 1) must be Tensor, not str
Would appreciate if help could be provided.
below is the code snippet where I am getting an error. I am using BERT mdoel
start_scores, end_scores = model(torch.tensor([input_ids]), # The tokens representing our input text.
token_type_ids=torch.tensor(
[segment_ids])) # The segment IDs to differentiate question from answer_text
# ======== Reconstruct Answer ========
# Find the tokens with the highest `start` and `end` scores.
answer_start = torch.argmax(start_scores)
answer_end = torch.argmax(end_scores)
In your line of code
start_scores, end_scores = model(torch.tensor([input_ids]),token_type_ids=torch.tensor([segment_ids]))
you have to make it:
start_scores, end_scores = model(torch.tensor([input_ids]),token_type_ids=torch.tensor([segment_ids]), return_dict=False).
It worked for me. I had the same problem.
metallica<-data.frame(Name = metallicaNames, Age = metallicaAges)
That's my exact code. I don't see a '>' anywhere. I know the '<' is correct. Where and what is my problem? I'm fairly new to R.
Thanks for the help
You need quotes around your strings, e.g.
metallica<-data.frame(Name = "metallicaNames", Age = "metallicaAges")
I'm trying to make a confidence interval for practice and I keep getting an error referring to:
an 'invalid number of breaks' at hist.default(boot.dist).
I'm pretty sure the problem is somewhere here.
Any advice or help would be very much appreciated at this point.
b=1000
boot.dist = rep(0,b)
for (i in 1:b) {
boot.sample = sample(ACS$Income, replace = TRUE)
boot.dist[i] = mean(boot.sample)
}
hist(boot.dist)
The problem is that ACS$Income is array of NA.
Example, this code will reproduce error exactly like yours:
boot.dist[1:1000]<-NA
hist(boot.dist )
Error in hist.default(boot.dist) : invalid number of 'breaks'
I am trying to run the below simple function in R studio
a<-testfunc15(state,outcome)
{
st<-state
out<-outcome
print(st)
tempdff<-healthcareoutcome[healthcareoutcome$State==st,]
tempdff
}
When i copy and paste of the R prompt of the R studio ,i get an error :
Error: could not find function "testfunc15"
> {
+
+ st<-state
+ out<-outcome
+ print(st)
+ tempdff<-healthcareoutcome[healthcareoutcome$State==st,]
+ tempdff
+
+ }
Error: object 'state' not found
when i try to source it :source("testfunc15.R")
then i get this error :
Error in eval(expr, envir, enclos) : could not find function"testfunc15"
I am saving the file in the same getwd() as other functions ,other functions are working fine.
Where am i going wrong ?
I couldn't find an answer on stackoverflow though there were many questions with the same description.
Please help
The first line of your code is telling R to store the result of testfunc15(state, outcome) in a. It is not defining the function.
Also your function as written here doesn't exist. It should be, as mentionned by Dason, either :
testfunc15 = function (state, outcome) or testfunc15 <- function (state, outcome)
And the end could be return(tempdiff) or tempdiff