similar to: Simulate user input in R

Displaying 20 results from an estimated 10000 matches similar to: "Simulate user input in R"

2013 Apr 23
1
Automation of R input
Hi all, I have R script which during its run require an input like this: choose between one of the grouping factor available : c("Village", "Country") can I automate this part, in other word to pass for example Village when I am running the script. One more thing the script is the TimeSeriesAnalysis {ndvits}. Thanks in advance for any help or suggestion. Regards, Vahe
2013 Apr 23
1
One more question please...
I executed the code in rstudio successfully: library("ndvits", lib.loc="/home/vahe/R/i686-pc-linux-gnu-library/2.15") ndvidirectory=paste(system.file("extdata/VITO_Mzimba", package="ndvits"), "/", sep="") region="Mzimba" Ystart=2004 Yend=2006 shape="SLP_Mzimba"
2013 Apr 24
1
R Interactive Mode
Dear all, We are doing some research about the time series analysis of NDVI, and we found the NDVITS package which is a very great tool. Unfortunately when we run it, after TimeSeriesAnalysis it asks to enter "Village or Country". library("ndvits", lib.loc="/home/vahe/R/i686-pc-linux-gnu-library/2.15")
2013 May 03
2
read .csv file and plot a graph
Hi all, I have a big .csv file (21Mb with 1000000 rows) it has this shape: x 1 NaN 2 NaN 3 0.23 and so on..... So the first column has x as a header then row number, the second column contains values between -1,1 and NaN for empty values. What should I need to do is: create a new .csv file from this one excluding NaN values and plot a line graph using the new .csv file. Or can I use the old
2012 Sep 28
1
z-score to percentile, and back again (Normal)
In R, what is the best way to convert z-scores (Normal distribution) to a percentiles, and vice-versa. (I'll be looking to do the same with other distributions eventually.) === Peter Petto <ppetto at ppetto.com> Bay Village, OH 440.249.4289
2013 Apr 23
0
One more question...
Thanks a lot Andrija... I run the following in Rsutdio: library("ndvits", lib.loc="/home/vahe/R/i686-pc-linux-gnu-library/2.15") ndvidirectory=paste(system.file("extdata/VITO_Mzimba", package="ndvits"), "/", sep="") region="Mzimba" Ystart=2004 Yend=2006 shape="SLP_Mzimba"
2013 Apr 23
0
Need a little help about this script...
library("ndvits", lib.loc="/home/vahe/R/i686-pc-linux-gnu-library/2.15") ndvidirectory=paste(system.file("extdata/VITO_Mzimba", package="ndvits"), "/", sep="") region="Mzimba" Ystart=2004 Yend=2006 shape="SLP_Mzimba" shapedir=paste(system.file("extdata/shape",
2011 Nov 25
3
counting values with some conditions in a simulation
Dear R users, I am running simulations (1000), and in my simulation I am looking at specific sums. For example, if the sum is >=4 then count this, if say <3, then don't count, if the sum=3, then generate a random number from uniform distribution, if this number is say less than 0.5, then count this sum, if greater than 0.5, then don't count. I am having trouble with introducing this
2011 Nov 29
2
format numbers without leading or trailing 0s
A simple question, but I can't find something to do what I want: Given: a vector of numbers, like lambda <- c(0, 0.005, 0.01, 0.02, 0.04, 0.08) Desired: format them in minimal space for use as plot labels, ie, without leading or tailing 0s. For this example: lambdaf <- c("0", .005", ".01", ".02", ".04", ".08") -- Michael
2012 Sep 05
1
Simulating key-press or keyword events on a Mac
Hello all, Can someone please tell me how I can simulate a key press (particularly arrow keys and space bar) on a Mac? Any help is much appreciated. Cheers [[alternative HTML version deleted]]
2012 Oct 01
2
Input and output of time series data - any function or packages that helps?
Hello, I work with time series data. From time to time I run programs to produce results that are in time series form (e.g., quarterly or monthly data). After a few days I might need to access part of the results and to run another program. Is there any function or package (like dataframe or zoo?) that might help so that I don't need to copy the results manually to a csv or xls file?
2011 Apr 04
2
how to handle no lines in input with pipe()
This has to do with using pipe() and grep and read.csv() I have a .csv file that I grep using pipe() and read.csv() as follows: read.csv(pipe('grep foo bar.csv')) However, is there a way to have this command run when for example, there is no "foo" text in the bar.csv file? I get an error message (appropriately): Error in read.table(file = file, header = header, sep = sep,
2011 Nov 10
5
Named components in a list
I'm studying lists and I came to an example where > L $name [1] "Fred" $wife [1] "Mary" $no.children [1] 4 $child.ages [1] 4 7 9 then following the instructions to extend the list with a new component, I executed: > L[5] <-list(NewName="something") and the new list I got was: > L $name [1] "Fred" $wife [1] "Mary"
2012 Apr 23
2
.rda vs. .RData
Are they the same with .RData being the newer format?? Thanks, ...Tao
2013 Oct 10
1
Rcpp and mclapply
Dear all, I have an R script that uses Rcpp, and I have been trying to parallelize it using mclapply (I tried with the multicore and the parallel library) Sometimes (not always, interestingly), the CPU use for each core drops, usually so that the total over all cores reaches 100%, i.e., as fast as if using just one single core fully. I tried my code directly from within emacs, and also using a
2013 Oct 12
1
lmerTest
Hi, I'm trying to user lmer function from lmerTest package because, if I understood correectly, it allows to make better inference than lmer method from lme4 package. However, whatever I do I keep getting this error: Error in lme4::lFormula(formula = mark ~ ssCount + sTime+ : rank of X = 1660 < ncol(X) = 1895 any ideas what could be a problem? thanks, Srecko [[alternative HTML
2012 Nov 11
2
Cropping a matrix by rows
Hello r-help, I've been banging my head against the computer in an attempt to learn how to divide my matrix into segments by rows. I want to be able to return each segment as a newly named object. I've tried looking at the apply functions and creating a for loop but brain no work. Here's the basic starting objects that I believe would be needed to separate the matrix. mat <-
2012 Jan 11
3
64bit R under 32bit winxp
Hi all: My OS is 32bit winxp,but I wanna install 64bit R2.14.1. >From the following website,it says "You can also go back and add 64-bit components to a 32-bit install, or vice versa" http://cran.r-project.org/bin/windows/rw-FAQ.html#Can-both-32_002d-and-64_002dbit-R-be-installed-on-the-same-machine_003f Does it mean that I can install and run 64bit R2.14.1 under 32bit
2011 Aug 15
3
write.table extra column
In the following data.frame there are 6 columns, but 7 are written to the CSV file. install.packages("pmlr") library(pmlr) data(enzymes) write.table(enzymes, sep=",", eol="\n",file="albert.csv")
2012 Mar 12
3
Idea/package to "linearize a curve" along the diagonal?
Hi, I am trying to normalize some data. First I fitted a principal curve (using the LCPM package), but now I would like to apply a transformation so that the curve becomes a "straight diagonal line" on the plot. The data used to fit the curve would then be normalized by applying the same transformation to it. A simple solution could be to apply translations only (e.g., as done after a