Set.seed() function help

Hi there,

I am somewhat new to R and needed a bit of help as I am experiencing a conundrum. I have pasted my code below:

#Section 1 - 1.1
df <- read.csv("spotify_dataset.csv")

#Section 1 - 1.2


I recieved an error after running the set.seed() function. It says the following:

Error in set.seed(10088444239) : supplied seed is not a valid integer
In addition: Warning message:
In set.seed(10088444239) : NAs introduced by coercion to integer range

Not sure if this error is due to not correctly importing this dataframe into r in section 1.1. Any help is greatly appreciated.

There are too many digits in the number you passed to set.seed(). Try removing one digit from that.

1 Like

I see, thank you. That seems to work!

\dots the reason being

> 2^32
[1] 4294967296
> 10088444239 > 2^32
[1] TRUE
1 Like

set.seed(123) will work just as well, This is used to keep the same sequence of random numbers each time you run your code, so that your results are not influenced by different random numbers.


This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.