I have a function in R that actually takes input a string and manipulates it's contents.
Let's assume this function:
myfunc <- function (string, ...., .... )
{
paste("string")
}
What I want to do is, I want to read the strings from a text file and store it in a data frame. Then, I want to call a function ( which I will have a loop I know ), to which I will pass my data frame, and it should print the contents of the whole file using the function that I just defined.
It will be something like ( assuming n to be the number of strings in the file )
myfunc2 <- function (dataframe,... , ... )
{
for ( i in n:1 )
{
myfunc(dataframe[i]
}
}
But, this doesn't work. Please help!