Simulating data using fakeR in R











up vote
0
down vote

favorite












I have a data frame named "data" with 74 variables/columns and 1751 observations/rows. I am attempting to use the fakeR library to simulate 1000 rows of fake data based on this existing data frame I have.



I have tried using



simulated_data <- simulate_dataset(data);


but keep getting
Error in table...attempt to make a table with >=2^31 elements



I have also tried to manually enter each variable into a data frame (suggested previously on a question from some other issue) but have gotten the same error. Like so,



df <- data.frame(data);
df$VARIABLE_NAME <- as.character(data$VARIABLE_NAME);


I'm really new to R and am struggling immensley. I could really use and appreciate any help. Thanks so much!










share|improve this question






















  • Perhaps this sort of task could just as easily be accomplished using the standard R library? x <- matrix(rnorm(74 * 1751, 100, 50), 74, 1751) will give you a matrix x that has the dimensions you specified, and the values are just random draws from the normal distribution with mean = 100 and sd = 50. You can always convert it to a dataframe by passing it to as.data.frame(). If you need fake string values, one easy way is to use all sorts of permutations of the built-in letter vectors letters and LETTERS
    – 12b345b6b78
    Nov 10 at 21:46












  • What classes are your df and columns?
    – iod
    Nov 10 at 23:05










  • @12b345b6b78 how could I get it to create random data based on data i already have? I am fetching a table in from SQL
    – XGingerDictator
    Nov 12 at 1:07










  • @iod I'm not sure I understand what you mean
    – XGingerDictator
    Nov 12 at 1:07










  • Can you provide the str() for your df?
    – iod
    Nov 12 at 1:16















up vote
0
down vote

favorite












I have a data frame named "data" with 74 variables/columns and 1751 observations/rows. I am attempting to use the fakeR library to simulate 1000 rows of fake data based on this existing data frame I have.



I have tried using



simulated_data <- simulate_dataset(data);


but keep getting
Error in table...attempt to make a table with >=2^31 elements



I have also tried to manually enter each variable into a data frame (suggested previously on a question from some other issue) but have gotten the same error. Like so,



df <- data.frame(data);
df$VARIABLE_NAME <- as.character(data$VARIABLE_NAME);


I'm really new to R and am struggling immensley. I could really use and appreciate any help. Thanks so much!










share|improve this question






















  • Perhaps this sort of task could just as easily be accomplished using the standard R library? x <- matrix(rnorm(74 * 1751, 100, 50), 74, 1751) will give you a matrix x that has the dimensions you specified, and the values are just random draws from the normal distribution with mean = 100 and sd = 50. You can always convert it to a dataframe by passing it to as.data.frame(). If you need fake string values, one easy way is to use all sorts of permutations of the built-in letter vectors letters and LETTERS
    – 12b345b6b78
    Nov 10 at 21:46












  • What classes are your df and columns?
    – iod
    Nov 10 at 23:05










  • @12b345b6b78 how could I get it to create random data based on data i already have? I am fetching a table in from SQL
    – XGingerDictator
    Nov 12 at 1:07










  • @iod I'm not sure I understand what you mean
    – XGingerDictator
    Nov 12 at 1:07










  • Can you provide the str() for your df?
    – iod
    Nov 12 at 1:16













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a data frame named "data" with 74 variables/columns and 1751 observations/rows. I am attempting to use the fakeR library to simulate 1000 rows of fake data based on this existing data frame I have.



I have tried using



simulated_data <- simulate_dataset(data);


but keep getting
Error in table...attempt to make a table with >=2^31 elements



I have also tried to manually enter each variable into a data frame (suggested previously on a question from some other issue) but have gotten the same error. Like so,



df <- data.frame(data);
df$VARIABLE_NAME <- as.character(data$VARIABLE_NAME);


I'm really new to R and am struggling immensley. I could really use and appreciate any help. Thanks so much!










share|improve this question













I have a data frame named "data" with 74 variables/columns and 1751 observations/rows. I am attempting to use the fakeR library to simulate 1000 rows of fake data based on this existing data frame I have.



I have tried using



simulated_data <- simulate_dataset(data);


but keep getting
Error in table...attempt to make a table with >=2^31 elements



I have also tried to manually enter each variable into a data frame (suggested previously on a question from some other issue) but have gotten the same error. Like so,



df <- data.frame(data);
df$VARIABLE_NAME <- as.character(data$VARIABLE_NAME);


I'm really new to R and am struggling immensley. I could really use and appreciate any help. Thanks so much!







r faker






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 21:40









XGingerDictator

1




1












  • Perhaps this sort of task could just as easily be accomplished using the standard R library? x <- matrix(rnorm(74 * 1751, 100, 50), 74, 1751) will give you a matrix x that has the dimensions you specified, and the values are just random draws from the normal distribution with mean = 100 and sd = 50. You can always convert it to a dataframe by passing it to as.data.frame(). If you need fake string values, one easy way is to use all sorts of permutations of the built-in letter vectors letters and LETTERS
    – 12b345b6b78
    Nov 10 at 21:46












  • What classes are your df and columns?
    – iod
    Nov 10 at 23:05










  • @12b345b6b78 how could I get it to create random data based on data i already have? I am fetching a table in from SQL
    – XGingerDictator
    Nov 12 at 1:07










  • @iod I'm not sure I understand what you mean
    – XGingerDictator
    Nov 12 at 1:07










  • Can you provide the str() for your df?
    – iod
    Nov 12 at 1:16


















  • Perhaps this sort of task could just as easily be accomplished using the standard R library? x <- matrix(rnorm(74 * 1751, 100, 50), 74, 1751) will give you a matrix x that has the dimensions you specified, and the values are just random draws from the normal distribution with mean = 100 and sd = 50. You can always convert it to a dataframe by passing it to as.data.frame(). If you need fake string values, one easy way is to use all sorts of permutations of the built-in letter vectors letters and LETTERS
    – 12b345b6b78
    Nov 10 at 21:46












  • What classes are your df and columns?
    – iod
    Nov 10 at 23:05










  • @12b345b6b78 how could I get it to create random data based on data i already have? I am fetching a table in from SQL
    – XGingerDictator
    Nov 12 at 1:07










  • @iod I'm not sure I understand what you mean
    – XGingerDictator
    Nov 12 at 1:07










  • Can you provide the str() for your df?
    – iod
    Nov 12 at 1:16
















Perhaps this sort of task could just as easily be accomplished using the standard R library? x <- matrix(rnorm(74 * 1751, 100, 50), 74, 1751) will give you a matrix x that has the dimensions you specified, and the values are just random draws from the normal distribution with mean = 100 and sd = 50. You can always convert it to a dataframe by passing it to as.data.frame(). If you need fake string values, one easy way is to use all sorts of permutations of the built-in letter vectors letters and LETTERS
– 12b345b6b78
Nov 10 at 21:46






Perhaps this sort of task could just as easily be accomplished using the standard R library? x <- matrix(rnorm(74 * 1751, 100, 50), 74, 1751) will give you a matrix x that has the dimensions you specified, and the values are just random draws from the normal distribution with mean = 100 and sd = 50. You can always convert it to a dataframe by passing it to as.data.frame(). If you need fake string values, one easy way is to use all sorts of permutations of the built-in letter vectors letters and LETTERS
– 12b345b6b78
Nov 10 at 21:46














What classes are your df and columns?
– iod
Nov 10 at 23:05




What classes are your df and columns?
– iod
Nov 10 at 23:05












@12b345b6b78 how could I get it to create random data based on data i already have? I am fetching a table in from SQL
– XGingerDictator
Nov 12 at 1:07




@12b345b6b78 how could I get it to create random data based on data i already have? I am fetching a table in from SQL
– XGingerDictator
Nov 12 at 1:07












@iod I'm not sure I understand what you mean
– XGingerDictator
Nov 12 at 1:07




@iod I'm not sure I understand what you mean
– XGingerDictator
Nov 12 at 1:07












Can you provide the str() for your df?
– iod
Nov 12 at 1:16




Can you provide the str() for your df?
– iod
Nov 12 at 1:16

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243676%2fsimulating-data-using-faker-in-r%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243676%2fsimulating-data-using-faker-in-r%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bressuire

Vorschmack

Quarantine