r

Count number of objects in a region

I have a tibble with coordinates of objects on image for many images. I want to calculate the number of images that resides in the box of specified size around the each object (something like number of neighbors). So far I came up with the…

Not able to use ggplot and gives an error

I installed ggplot2 with all the dependencies = TRUE
When I try to plot something, I get this error. Please help!
I tried uninstalling and installing R studio again but no success
Error in namespaceExport(ns, exports) :
undefined export…

Nested lappy in r

So I have function that takes 2 argument to read txt files from a site. The arguments are 1 the names of city and the 2nd one is the type of data. I have 2 list to pass it down as arguments which are the list of cities and the list of type…

R – identify sequences in a vector

Suppose I have a vector ab containing A’s and B’s. I want to identify sequences and create a vector v with length(ab) that indicates the sequence length at the beginning and end of a given sequence and NA otherwise.
I have however the …

How to call Neo4j database api in R Studio

Please I created a Neo4j database instance, and I am trying to call it in R Studio, using the neo4r and neo4jshell packages. After running the api call, I still get a 404even though I correctly specified the url, username, and password. Pl…

How to call Neo4j database api in R Studio

Please I created a Neo4j database instance, and I am trying to call it in R Studio, using the neo4r and neo4jshell packages. After running the api call, I still get a 404even though I correctly specified the url, username, and password. Pl…

transform dataframe with unlist

I use R and I have a dataframe with 3 columns that contains values separed with ",".
Here’s what it looks like :

col_A
col_B
col_C

first_name,last_name,age
John,Appleseed,23
Steve,Jobs, 33

I want each value separed by…