Displaying 20 results from an estimated 20000 matches similar to: "str: how to use "no list" recursively?"
2010 Mar 25
6
c(), or cat(), or paste(), all cause unwanted reordering
Hi,
I would expect the following:
paste(
as.character( cat( rep( ".", 2 ) ) ),
"a string",
as.character( cat( rep( ".", 3 ) ) )
);
to yield this string: ". . a string . . .", but instead it yields this:
> . .. . .[1] " a string "
The third argument has been stuck immediately after the first. The same
thing happens with cat() or c().
2008 Oct 09
2
Exporting symnum() result from cor()
Hello,
I am trying to export the results from symnum() while maintain their
readability. I tried using sink to text file and also copying and pasting
but the results end up looking like this:
> symnum(c5.s)
bC bED bEN bLP bLS bPA bPD bPR p
bbContag 1
bbED + 1
bbENN_MN + B 1
bbLPI , , , 1
bbLSI + B B , 1
bbPAFRAC , * * , * 1
bbPD , B B
2008 Dec 14
3
Some clarificatins of anova() and summary ()
I have two assignment problems...
I have written this small code for regression with two regressors .
n <- 50
x1 <- runif(n,1,10)
x2 <- x1 + rnorm(n,0,0.5)
plot(x1,x2) # x1 and x2 strongly correlated
cor(x1,x2)
y <- 3 + 0.5*x1 + 1.1*x2 + rnorm(n,0,2)
intact.lm <- lm(y ~ x1 + x2)
summary(intact.lm)
anova(intact.lm)
the questions are
1.The function summary() is convenient since
2008 Dec 14
3
Some clarificatins of anova() and summary ()
I have two assignment problems...
I have written this small code for regression with two regressors .
n <- 50
x1 <- runif(n,1,10)
x2 <- x1 + rnorm(n,0,0.5)
plot(x1,x2) # x1 and x2 strongly correlated
cor(x1,x2)
y <- 3 + 0.5*x1 + 1.1*x2 + rnorm(n,0,2)
intact.lm <- lm(y ~ x1 + x2)
summary(intact.lm)
anova(intact.lm)
the questions are
1.The function summary() is convenient since
2009 Dec 04
2
shorten str() output for long list
> x=split(1:1000,1:1000)
> str(x)
Although str() can suppress long output for vectors, but it can not
suppress long output for list. I'm wondering how to suppress the
output for long lists.
2009 Feb 18
4
Disambiguate List Item Followed by Code Block
Howdy,
Quick question: Since list items with multiple paragraphs need to be
indented four spaces, and code blocks are also indented four spaces,
is there any way to disambiguate a list followed by a code block?
Example:
* This is a list
item.
* And so is this.
Is this a second paragraph in the second list item,
or a code block?
It looks like Markdown.pl and discount
2010 Mar 12
1
simple plot in ggplot2, wrong error bars
I was wondering if anyone could help me with this, simple problem.
I am essentially following the example on Hadley's webpage
(http://had.co.nz/ggplot2/geom_errorbar.html), but it still doesn't make any
sense to me.
df <- data.frame(trt = factor(c("intact", "intact", "removed", "removed")),
coon = c(0.093, 0.06, 0.057, 0.09), group =
2016 Jun 02
6
-Wmisleading-indentation violations
Hi,
I was building LLVM with gcc 6.1.1 recently and it was spitting out
some warnings relating to misleading indention that caught my eye.
This wasn't a fresh build so I may have missed some. I've CC'ed the
authors of the potentially misleading lines so they can decide what do
about the warnings (if anything).
I'm wondering if clang-format is making some inappropriate choices
2017 Sep 06
2
[PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning
gcc thinks that interpreting a multiplication result as a bool
is confusing:
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c: In function 'read_pll':
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c:133:8: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
In this instance, I think using multiplication is more intuitive
than
2012 Nov 10
0
[LLVMdev] Inlining bitcast functions...
On Fri, Nov 9, 2012 at 3:58 PM, Relph, Richard <Richard.Relph at amd.com> wrote:
> Eli,
> Thanks. I don't think it's a bug in the linker, really… it's required to treat (stripped) opaque types as different, since it really has no way to know if the caller and the callee really are referring to the same thing… though it then seems to turn right around and do exactly that
2007 Aug 03
2
Bug: Code block after list
Maybe this has been reported before, but I can't find it in the
archives.
A code block immediately following an ordered or unordered list
breaks both the list and the code block. Badly.
Tab or spaces for the block don't matter, legal indentation variants
of the list don't matter. Tried a bunch of casual workarounds,
extra newlines, etc., but no joy. Needs explicit
2011 May 19
0
Flattening lists and environments (was: "how to flatten a list to the same level?")
Dear list,
I came up with a two functions that flatten arbitrary deeply nested
lists (as long as they're named; not tested for unnamed) and
environments (see attachment; 'flatten_examples.txt' contains some
examples).
The paradigm is somewhat similar to that implemented in 'unlist()', yet
extends it. I would have very much liked to build upon the superfast
functionality
2017 Aug 04
2
Layer problem in DrawDensity3D (VecStatGraphs3D)
Hi,
When plotting the density estimation with DrawDensity3D-function (in
package VecStatGraphs3D) it often happens that the end product ie.
layers are not intact , see figure in the link:
https://www.dropbox.com/s/vzyaiu0vso8hjw2/20623868_10213333234554853_1371245353_n.png?dl=0
Can we somehow effect on that an get intact layers?
--
Atte Tenkanen
2008 Jul 06
1
What is my replication unit? Lmer for binary longitudinal data with blocks and two treaments.
First I would like to say thank you for taking the time to read it.Here is my
problem.
I am running a lmer analysis for binary longitudinal (repeated measures)
data.
Basically, I manipulated fruits and vegetation to two levels each(present
and absent) and I am trying to access how these factors affect mice foraging
behavior. The design consist of 12 plots, divided in 3 blocks. So each
block
2012 Nov 10
2
[LLVMdev] Inlining bitcast functions...
Spoke too soon... running the inst combine pass does seem to resolve the linker/inlining issue. But the resulting code fails to run correctly. I was expecting the same result that I get when running with unstripped modules, that is passing test runs. When it still failed, I guessed the failure mode to be the same, but it isn't.
Not sure WHAT to make of this...
2016 Feb 03
4
How bad is "rm -rf /" ?
Dear All,
Suppose I executed the command
rm -rf /
on my CentOS 7 box. After it did what it could, how much damage will be
done to what I have (or _had_ rather ;-) on my hard drive?
I'm going to describe simple experiment which was prompted in another
thread. I need to say a few words before I do it, however. First of all,
that other thread was about doing the same thing on UEFI machine.
2010 Apr 09
4
perhaps regular expression bug with | sign ??
Here is my interaction with R:
> sub(x='>|t|',pattern = '|t',replacement='zz')
[1] "zz>|t|"
So I say to myself "Clearly the | signs need to be escaped, so let's try
this"
> sub(x='>|t|',pattern = '\|t',replacement='zz')
[1] "zz>|t|"
Warning messages:
1: '\|' is an unrecognized escape in a
2017 Sep 06
2
[PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning
On Wed, Sep 6, 2017 at 4:20 PM, Karol Herbst <karolherbst at gmail.com> wrote:
>> In this instance, I think using multiplication is more intuitive
>> than '&&', so I'm adding a comparison to zero instead to shut up
>> the warning. To further improve readability, I also make the
>> error case indented and leave the normal case as the final
2011 Mar 06
2
Can body() return a function's body intact, in order, and as characters ready for editing?
Is my understanding correct that the body()
function currently can't return a function's body
intact, in order, and as characters ready for
editing?
My testing and reading of body()'s help indicate
that it can not.
Here's what I'm seeing.
Consider pasting
1+
and a function containing
x^2
together to get
1+x^2
As you can see below, body() reports three
2008 Dec 17
1
Rsync and recursion protection with .svn folders
Dear rsync forum,
I'm writing to you regarding svn rsync problem.
Here is the premise. I am a web developer who needs to use svn.
Unfortunately I cannot install in on the production server. So what I have
done is that I copy the whole website folder from the server via ftp (I have
no other access) to my local machine using lftp.
At this stage I try to use sync the local copy folder with a