similar to: Sourcing my file does not print command outputs

Displaying 20 results from an estimated 1000 matches similar to: "Sourcing my file does not print command outputs"

2013 Feb 07
0
FW: Sourcing my file does not print command outputs
Forgot to send to R-help From: Nordlund, Dan (DSHS/RDA) Sent: Thursday, February 07, 2013 2:09 PM To: 'James Jong' Subject: RE: [R] Sourcing my file does not print command outputs James, Your code seems to have ‘…’ sitting on a line all by itself (maybe should be at the end of the preceding comment? Anyway, when I eliminated that problem and sourced the script using the following call
2013 Feb 07
1
Saving model and other objects from caret
Say I train a model in caret, e.g.: RFmodel <- train(X,Y,method='rf',trControl=myCtrl,tuneLength=1) How can I save this to disk and load it later in R? How about an object of the class "resamples"? resamps <- resamples( list( RF = RFmodel, SVM = SVMmodel, KNN = KNNmodel, NN = NNmodel )) Thanks,
2009 Apr 15
2
problem with read.table
Hi all, I've simple code to read a file (verify.txt in the same directory as the script file) but when I run this I get "Error in eval(expr, envir, enclos) : object "y" not found". data_model.df = read.table("./verify.txt", header=TRUE, nrows=10); f <- lm(y ~ x) Could someone pls tell me what's wrong with this code? Sincere thanks!
2012 Jun 12
6
Attempting to update from R 2.14 to 2.15
I am very new to Linux so I probably am doing something stupid but I cannot seem to update to R 2.15 Using Ubuntu 12.02 Precise Penguin I realise that debian packages are not updated regularly so I tried to follow the insructions at the R-site So far, I have modified /etc/apt/sources.list to read ## R CRAN added 2012-06-12 deb http://probability.ca/cran/bin/linux/debian squeeze-cran/ Issued
2013 Feb 10
1
Training with very few positives
I have a binary classification problem where the fraction of positives is very low, e.g. 20 positives in 10,000 examples (0.2%) What is an appropriate cross validation scheme for training a classifier with very few positives? I currently have the following setup: ======================================== library(caret) tmp <- createDataPartition(Y, p = 9/10, times = 3, list = TRUE)
2013 Feb 12
7
Is there a neat R trick for this?
Hello all, given two vectors X and Y I'd like to receive a vector Z which contains, for each element of X, the index of the corresponding element in Y (or NA if that element isn't in Y). Example: x <- c(4,5,6) y <- c(10,1,5,12,4,13,14) z <- findIndexIn(x, y) z [1] 5 3 NA 1st element of z is 5, because the 1st element of x is at the 5th position in y 2nd element of z is 3,
2010 Feb 25
5
Plotting 15 million points
Hi All I have a vector of about 15 million numbers which I would like to plot. The goal is the see the distribution. I tired the usual steps. 1. Histogram : never gets complete my window freezes w/out log base 10 2. Density : I first calculated the kernel density and then plotted it which worked. It would be nice to superimpose histogram with density but as of now I am not able to get this
2012 Oct 04
3
Failure of sas7bdat package
R 2.15.1 OS 10.7 Colleagues I have been an enthusiastic user of the sas7bdat package in R. However, several recent sas7bdat files sent to me from different sources cannot be read by the package. The error message is: Error in read.sas7bdat(FILENAME) : unknown host W32_7PRO please report bugs to sas7bdatRbugs at gmail.com I examined the file with a text editor and it contains
2013 Mar 06
1
CARET and NNET fail to train a model when the input is high dimensional
The following code fails to train a nnet model in a random dataset using caret: nR <- 700 nCol <- 2000 myCtrl <- trainControl(method="cv", number=3, preProcOptions=NULL, classProbs = TRUE, summaryFunction = twoClassSummary) trX <- data.frame(replicate(nR, rnorm(nCol))) trY <- runif(1)*trX[,1]*trX[,2]^2+runif(1)*trX[,3]/trX[,4] trY <-
2007 Feb 28
3
Datamining-package rattle() Errors
Dear Group I have few errors while installing package rattle from CRAN i do the installing from the local zip files... I am using R 2.4.0 do i have to upgrade to R2.4.1 ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ utils:::menuInstallLocal() package 'rattle' successfully unpacked and MD5 sums checked updating HTML package descriptions > help(rattle) No
2008 Mar 12
7
Specifying relative position of text in a plot
What is the simplest way to specify the location of text in a scatter plot (created using the plot function) in relative terms rather than specific x-y coordinates? For example, rather than putting text at (300,49) on a plot, how do I put it 1/10 of the way over from the y axis and 1/2 of the way up from the x axis? Thanks. Tom -- View this message in context:
2012 Jun 19
2
matchit - can I weight the parameters?
This may be a really obvious question but I just can't figure out how to do it. I have a small dataset that I am trying to compare to some controls. It is essential that the controls are matched on Cancer Stage (a numerical factor between 1 and 4), and then ideally on Age (integer), Gender (factor), Performance Status(factor). I'm using matchit to try and do this, but it seems to give
2011 Mar 01
3
Difference in numeric Dates between Excel and R
Hello. I am using some dates I read in excel in R. I know the excel origin is supposed to be 1900-1-1. But when I used as.Date with origin=1900-1-1 the dates that R reported me where two days ahead than the ones I read from Excel. I noticed that when I did in R the following: > as.Date("2011-3-4")-as.Date("1900-1-1") Time difference of 40604 days but if I do the same
2010 Dec 06
5
How can I refer to actual (n) and previous (n-1) elements in a vector?
Hello, How can I apply a function on a vector that refers to actual (n) and previous elements in the vector (e.g. n-1)? For example: I would like to calculate the sum of (n-1) + n for each element of a vector and get a vector as a result. Besides others I tried this: v<-c(3,6,8,1,1,3,9,5,6,3) for (i in 1:NROW(v)){a[i]<-a[i-1]+a[i]} I would like to get this result:
2011 Nov 16
4
Pairwise correlation
Dear All, I am not familiar with R yet I want to use it to perform some task, hence my posting here. I hope someone can help. I have a set of data, genes (rows) and samples (columns). I want to do a Pearson correlation on all the possible pairwise combinations of all the genes (2000). Does anyone have an idea of how to execute this in R? Thanks in advance. -- View this message in context:
2017 Jun 13
0
WG: Fw: Re: rmarkdown and font size
Hi Dan, Hi All, I read the below post. I am wondering how do I know which "keys" are available, e.g. "core.r" and "pre". Where kind I find the definition of what can be adjusted and which "words" to use? Kind regards Georg > Gesendet: Donnerstag, 08. Juni 2017 um 16:16 Uhr > Von: "Nordlund, Dan (DSHS/RDA)" <NordlDJ at
2013 Nov 26
4
how to deal with xml files within Puppet ?
hi there, I have to create a new server.xml which should be build from at least 3 or 4 another xml files. How could to copy and paste with puppet methods ? On a command line under Unix I would do cat 1.xml > my_file.xml ; cat 2.xml >> my_file.xml; cat 3.xml >> my_file.xml. I have to say, I''m pretty new to puppet and simply have no clue how to tackle this task ;=(
2015 Aug 25
5
sed question
I am trying to use sed to change a value in a pipe. ------------------- This is the two line script CHANGE="1234" cat my_file.txt | sed 's/CANCELID/$CHANGE/' > cancel.txt ------------------- and the my_file.txt has: <v1:notificationId>CANCELID</v1:notificationId> it gets changed to $CHANGE instead of the actual value 1234 . I tried putting a \ in front
2004 Jul 13
1
Synatx Error on start with R --no-save < myfile.R
Dear all! I wrote my R-code with an editor and loaded it with source("my_file.R"). Everything works fine as expected. When I try to start my code with: R --no-save < my_file.R I do get a synatx error half way through. The version is 1.9.0 on a Linux system. To start it with R --no-save < my_file.R works on some machines but on some it doesn't. Are there any rules
2011 May 24
2
escape characters in shell commands
On a Windows platform I am trying to count the number of lines in a file. In a DOS window, the following works: C:\Users\jar>findstr /R /N "^" D:\my_dir\my_file | find /C ":" 5317 (it works with double \\ also) But in R, I need to make this string up with the file name I get from file.choose(): filename = file.choose() #get the number of lines in the file # first make a