Reddit | R programming language
0 FOLLOWERS
Discussions and popular articles about implementing R programming language for statistics and data science from the Reddit community
Reddit | R programming language
11h ago
Hi, I am trying to plot a scattergraph of OTUs (DNA sequences) against abundance in 2 samples. My source is a CSV file which I have imported so it looks like this
https://preview.redd.it/p2wyf8ctwavc1.png?width=372&format=png&auto=webp&s=d9ca5684669b97ef5844b8d3cf7ad28c83213e5a
My problem is when I go to plot this, R does not recognise the column names (OTU, Count - control and Count - 50). I converted the CSV to a dataframe using as.dataframe but am unsure how to rename these columns or what I need to do to make them into a language R understands to then use ggplot(aes(x= and so ..read more
Reddit | R programming language
19h ago
Due to the same description(GO term) in different types of cell clusters, the two different bar has come together in the picture, i need it be separate like the second picture, what should i do?
submitted by /u/AbigailLeej
[visit reddit] [comments ..read more
Reddit | R programming language
21h ago
Good morning,
I've been working in this function to implement Kalman Filter in R (its purpose is to be used on optimization). However, it is slow, so I would like to code it on a more efficient way:
ofn <- function(th) { # OFN Summary of this function goes here: # performs the Kalman filter operation for a state-space model. # calculates the likelihood of the model. # iterates over all obs predicting and updating the factor (beta) and P. # calculates likelihood at each step and returns the negative sum. # used for maximum likelihood estimation to find the parameter values. # Given th, we ..read more
Reddit | R programming language
1d ago
Please help. I'm trying to create a gauge meter in SAC using R visualization which uses R language. From the input data in SAC (input data name is DT_Budget_vs_Actual) I would like to aggregate values in column Amount with values in column Unique ID equal to Actual or Budget. So I would get 2 output, sum of Amount for Actual and sum of Amount for Budget. I will then use these output to create a chart. But I encounter below error
Error in value[[3L]](cond) : unused argument (by = .("Unique ID"))
Here is the script:
aggregate_amount <- function(data) {
aggregated_data <- data[, .(Total_ ..read more
Reddit | R programming language
2d ago
I am working with the India Human Development Survey. The following are the variables of interest - STATEID, DISTID, PSUID, HHID, and PERSONID are state ID, district ID, village ID, household ID, and person ID respectively. RO10 and R09 are the Mother ID and Father ID of a person. ED5 and ED6 are 'enrolled now' and ED6, and the completed year's variables. ED5 takes the value of 1 if a person is enrolled in an institution and 0 if they are not. For each of the persons, if their mother and father were also surveyed, I would like to create new variables for parent’s education.
The code should ma ..read more
Reddit | R programming language
2d ago
Hello :)
I've been using R to measure Gini index for a research I'm in, however, i've come across a few different packages that measure, at first, the same Gini. Currently I'm using DescTools, but Ineq also sounds good and I'm going to end up using it anyway for other inequality indexes. The problem is that both packages end up giving different Gini numbers for the same data. I read both documentations, made sure that all parameters are correct and the same data is being used, but still, both give different values at the end. How do I know which one is more appropriate to use?
submitted by ..read more
Reddit | R programming language
2d ago
I have a dataset with 10 shannon diversity values per category for 6 categories (control and 10-50). this is the beginning of my dataset.
https://preview.redd.it/mgaa0th8u2vc1.png?width=313&format=png&auto=webp&s=daeaf8b87731d985059ffc7c32343fd442f01b5b
I want to make a scatterplot with a linear regression (and ideally standard error shown) but when I put in the code, no line appears. Any idea what could be wrong?
https://preview.redd.it/d9vmo1dku2vc1.png?width=915&format=png&auto=webp&s=0d555789dd020aabb0c7853858855f06ecdaebaf
https://preview.redd.it/2aesqjtnu2vc1.p ..read more
Reddit | R programming language
2d ago
Hi! I have some old Lotus files on our server (WK3, WK4), and I would love to open them without having to ask IT to install a new software (like libreoffice). Is there a way to open them in R? Thanks!
submitted by /u/bassmapper
[visit reddit] [comments ..read more
Reddit | R programming language
2d ago
Hi! We are trying to figure out how to calculate a double integral in R with at least one function as a boundary. So, I have my function h(x,y) and I want to calculate the double integral for x from min_x to max_x and y from min_y to max_y, where (for example) max_y is a function of x.
My R skills are very limited (I'm an old Matlab-guy...), but I was trying to help someone out with this. We found the integral2 function in pracma, but it seems that that one places a fairly coarse grid on h(x,y) for its calculations. Unfortunately, h(x,y) is not very smooth, so we need a far finer grid.
Is the ..read more
Reddit | R programming language
2d ago
Dear redditors
I am trying to do textmining with R for my bachelor thesis (not main focus - I am totally new to programming).
With books and AI I was able to solve a lot of problems but there is a major one I cannot solve.
I have 4 txt documents with a lot of pages. I will provide you with some excerpts:
First example
Gedan- ken mögen Ihnen da durch den Kopf gehen? Sehen Sie der Aufgabe eher ängstlich und ab- lehnend entgegen oder freuen Sie sich sogar darauf? Wird das Ihre erste Begegnung mit au- tistischen Schülerinnen und Schülern sein oder verfügen Sie schon über Erfahrung? Gibt es
My ..read more