Displaying 20 results from an estimated 4000 matches similar to: "How to quit R script & return to R prompt"
2012 Feb 14
1
txtStart creates a NULL file
Hello all:
I'm trying to use the following code to get commands, comments and results to a .txt file. It only appears to capture comments. When I comment those out with #, it creates a NULL file.
Someone seemed to have a similar problem with a mac GUI (https://stat.ethz.ch/pipermail/r-help/2010-September/253177.html) but the result seemed to be ambiguous. Is there a work-around?
2007 May 24
1
"[RODBC] ERROR: Could not SQLExecDirect"
Hi, everyone,
I try to run as follows:
Z>library("RODBC")
Z>cnct<-odbcConnectExcel("Forbes2000.xls")
Z>cnct
RODB Connection 1
Details:
case=nochange
DBQ=C:\Program Files\R\R-2.5.0\Forbes2000.xls
DefaultDir=C:\Program Files\R\R-2.5.0
Driver={Microsoft Excel Driver (*.xls)}
DriverId=790
MaxBufferSize=2048
PageTimeout=5
Z>sqlQuery(cnct, "select
2009 Sep 11
0
ipred bagging segfault on 64 bit linux build
I wanted to report this issue here so others may not find themselves alone
and as the author is apparently active on the list.
I havent done an exhaustive test by any means, cause I dont have time. But
here's a small example. Apparently the "ns" argument is the one that is
killing it. I've gotten several different segfault messages, the only other
one I remember said "out
2008 Jan 20
2
Newbie question on subsets
Hi...
I'm working through the book, A Handbook of Statistical Analyses
using R by Everitt, and I'm trying to do the following (p. 19 of his
book):
boxplot(log(marketvalue)~country,
data = subset(Forbes2000,
country %in% c("United
Kingdom","Germany","India","Turkey")),
ylab="log(marketvalue",
2001 Aug 21
4
looking for a smarter way
I have two problems where I've come up with some code that will do the
analysis that I want, but it looks pretty clumsy. In the first case, I
calculate the variance on five different columns for each of 14 clusters and
get them into one matrix. I get the job done, but I would have thought that
it could be done in one or two lines, not six, and be generalized so that it
didn't matter how
2006 Feb 05
1
3-dimensional table
Hi,
Last week my class conducted an experiment by putting out clay
caterpillars to look at the effects of urbanization, color, and location
on caterpillar predation. There were two sites (urban, rural), three
colors (green, yellow, red) and two locations at each site (edge,
interior). The entire data set is below. I've checked out the MASS
book, Dalgaard's book, and the R-help archives
2010 Jan 20
1
Reshaping data with xtabs giving me 'extra' data
Dear all,
Lets say I have several data frames as follows:
> set.seed(42)
> dates <- as.Date(c("2010-01-19", "2010-01-20"))
> times <- c("09:30:00", "11:30:00", "13:30:00", "15:30:00")
> shows <- c("Red Dwarf", "Being Human", "Doctor Who")
>
> df1 <- data.frame(Date = dates[1],
2004 Nov 29
1
Seeking help with a simple loop construction
Hello,
I have a df, pp, with five variables:
> nobs(pp)
q10_1 q10_2 q10_3 q10_4 actcode
1620 1620 1620 1620 1620
I want to create a loop to run four xtabs (the first four variables above by the fifth) and then store the results in a matrix. Below I make my intent clear by showing the output of one xtab which is inserted into a matrix.
> a <- xtabs(q10_1 ~
2010 May 20
2
multiple 2 by 2 crosstabulations?
Hello,
I have a dataframe (var_1, var_2, ..., var_n) and I would like to export summary statistics to Latex in the form of a table. I want specific summary statistics by crossing numerous variables 2x2 AT ONCE. In each cell I would like sometimes to have the median (Q1 - Q3), or frequency and proportion, etc. CrossTable, xtab, etc... do not allow for multiple 2 by 2 crosstabulation. The table
2010 Sep 10
4
Counting occurances of a letter by a factor
I'm trying to find a more elegant way of doing this. What I'm trying to accomplish is to count the frequency of letters (major / minor alleles) in a string grouped by the factor levels in another column of my data frame.
Ex.
> DF<-data.frame(c("CC", "CC", NA, "CG", "GG", "GC"), c("L", "U", "L",
2013 Jun 04
1
Zero-Inflated Negative Binomial Regression
Hi!
I'm running a zero-inflated negative binomial regression on a large (n=54822) set of confidential data. I'm using the code:
ZerNegBinRegress<-zeroinfl(Paper~.|., data=OvsP, dist="negbin", EM=TRUE)
And keep getting the error:
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
I've done enough reading about this error to realize that I have
2007 Dec 07
2
rpc.idmapd error after upgrade to 5.1
Hello,
after upgrade from CentOS 5 to 5.1 I see the following error
in /var/log/messages:
'rpc.idmapd[2330]: main: open(/var/lib/nfs/rpc_pipefs/nfs): No such
file or directory'
The directory exists with the permissions
dr-xr-xr-x 2 root root 0 Dec 7 10:21 nfs
So is this an owner/permisson problem?
Should /var/lib/nfs/rpc_pipefs/nfs be owned by rpcuser?
# ls -al /var/lib/nfs/
total
2012 Jan 31
2
question on simple graph
I am having trouble generating a graph.
I want to know the % of respondents who answered that they "strongly
agree" or "agree" the "America owes R's ethnic group a better chance"
(BTTRCHNC) and I want to organize it by racial group (RACESHRT).
"BTTRCHNC" is organized ordinally from 1 through 5 with 1=Strongly
Agree, 5=Strongly Disagree
2008 Aug 22
1
Problem using rsync for backing up on to a NAS
Hi,
I have a problem that was already discused in the german archlinux forum
and couldn't be solved. Because of this I was asked to use the rsync
mailing list. So here I am ;b
I'm using the following script to backup my data to a Network Attached
Storage that has an ext3 formated hdd that is mounted via NFS
script: http://pastebin.com/f6b7115c9
This script works fine for /home but
2002 Jul 12
2
Crosstabs in R
Before I reinvent the wheel, I have need for a relatively straightforward
crosstabulation (2 x n) function. I know that R has table(), ftable(),
xtabs(), and summary(xtabs()), but none of these produce a fully "tricked"
out cross-tabulation with marginal totals, expected cell frequencies, and
an array of statistics about the contingency table.
Is there a more complete (something
1998 Oct 21
0
Crosstabs
Karsten,
I have a function which might be too simple, but could be modified to
what you requested. It is called "xtab" and appears to run okay on my
version of R (0.61.2). The tar.gz file includes text coding for "xtab"
and "padding" which is called. I set up empty functions and read the
text code into the editor, although there is probably a better way.
Hope it
2011 Mar 30
2
calculating the mode in R...
Dear R users
I?m aware that the package ?modest? is useful to find the mode in an array.
However, I?d like to know if someone has translated the ?mode? function built-in
in MATLAB into R language. This function finds the most frequent value in an
array (http://www.mathworks.com/help/techdoc/ref/mode.html).
Best
Fer
2016 Apr 26
0
How to print the frequency table (produced by the command "table" to Excel
Hi jpm miao,
You can get CSV files that can be imported into Excel like this:
library(prettyR)
sink("excel_table1.csv")
delim.table(table(df[,c("y","z")]))
sink()
sink("excel_table2.csv")
delim.table(as.data.frame(table(df[,c("y","z")])),label="")
sink()
sink("excel_table3.csv")
2006 Oct 22
2
cross tabs with percents?
-- apologies if this is a dup - i got a bounce saying the message was
unprocessed.
Is there a straightforward way to get a table with percents in the
cells rather than counts? I've looked at table, ftable, xtabs, and
ctab, which did the conversion but returned the results in a single
row without labels.
any suggestions are appreciated.
thank you.
2005 Jun 06
1
don't want xtab sorting "numeric" factors...
r-gurus,
I couldn't find an answer to this and after an hour or so of trying all
types or ways to do this, I've given up for now.
I'm having trouble getting the results from xtabs to generate
"unsorted" factors. I've generated a sample data.frame I want to
create a table from, using xtabs, and the results are presented below,
> temp
treatment itpa qmd