Home>

### calculate constants using r

I want to learn statistics, and I think that languages ​​such as Python and R are the main languages ​​used in that case. This time, I would like to use R to obtain a rough value from the experimental results of the constant a in the following experiment using a distribution map.

Experiment details

In this experiment, if the force does not work on the object, the agenda is to investigate how the object moves.
When the force does not act on the object, I want to build a state where gravity is almost zero, but it is a little difficult, so the state where the force of injection and gravity are balanced. In other words, we will create a state where gravity is not working.

At that time, measure how far you have traveled for a certain period of time. ・ How much I want to travel for a certain period of time from the difference at that time. I think.

What you did

First, substitute the distance traveled for a certain time into the variable d

``x<-c (2, 5, 2, 5, 3, 3, 3, 3, 2, 3, 2, 4, 3, 3, 3, 3, 3)``

Execution result

``[1] 2 5 2 5 3 3 3 3 2 3 2 4 3 3 3 3 3``

I want to create a distribution chart

``plot (x)``

Execution result (= photo 1 =)

You can see that x is 3.0 even in such a distribution chart, but the distribution chart like R in the data set prepared by R (Photo 2 =) and the change in speed Graph shown (= photo 3 =)
How can I fill in the data?

Also, since I executed`barplot (x)`, the graph was not created.
In this case, how can I set the data set so that a graph can be created?